You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pyactive_project/README.md
+58-39Lines changed: 58 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,11 +55,13 @@ using the standard threading library. We validated the performance and expressi
55
55
***serve_forever**. It’s used like launch function but once the function ends, the program continues.
56
56
57
57
58
-
## How to use PyActive?
58
+
## What do you need to run PyActive?
59
59
60
60
61
61
In this section we explain all you need to use this middleware. It's easy!
62
62
63
+
Into Pyactive_Project folder you can find how to install the middleware in INSTALL.txt.
64
+
63
65
**Requirements**
64
66
* If you only use the threads module, you only need Python 2.7
65
67
@@ -82,42 +84,59 @@ Choose the module using the function: 'start_controller'. Nowadays,
82
84
you can put either the parameter 'tasklet' or 'atom_thread' to choose the module.
83
85
Note that you choose the tasklet module, you need the Stacklees Python.
84
86
87
+
## Hello_world example
88
+
89
+
In this section you can see a simple Hello World synchronous and asynchronous. In Pyactive_Project you can find more complex examples into Examples folder.
90
+
91
+
**Hello_World Synchronous**
92
+
93
+
from pyactive.controller import init_host, launch,start_controller, sleep
94
+
class Server():
95
+
_sync = {'hello_world':'1'}
96
+
_async = []
97
+
_parallel = []
98
+
_ref = []
99
+
def hello_world(self):
100
+
return 'hello world'
101
+
102
+
def test():
103
+
host = init_host()
104
+
105
+
# parameters 1 = 'id', 'test_sync' = module name, 'Server' = class name
0 commit comments