aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/luaproc/README
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/luaproc/README')
-rw-r--r--libraries/luaproc/README97
1 files changed, 97 insertions, 0 deletions
diff --git a/libraries/luaproc/README b/libraries/luaproc/README
new file mode 100644
index 0000000..bc37dfe
--- /dev/null
+++ b/libraries/luaproc/README
@@ -0,0 +1,97 @@
1***************************************************
2*
3* Copyright 2008 Alexandre Skyrme, Noemi Rodriguez, Roberto Ierusalimschy
4*
5* Permission is hereby granted, free of charge, to any person obtaining a copy
6* of this software and associated documentation files (the "Software"), to deal
7* in the Software without restriction, including without limitation the rights
8* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9* copies of the Software, and to permit persons to whom the Software is
10* furnished to do so, subject to the following conditions:
11*
12* The above copyright notice and this permission notice shall be included in
13* all copies or substantial portions of the Software.
14*
15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21* THE SOFTWARE.
22*
23*****************************************************
24*
25* [README]
26*
27****************************************************
28
29
30**************
31* PARENT API *
32**************
33
34-- Create a new lua process
35-- Returns true if sucessful or nil, error_message if failed
36luaproc.newproc( <string lua_code> )
37
38-- Create a new worker (pthread)
39-- Returns true if sucessful or nil, error_message if failed
40luaproc.createworker( <void> )
41
42-- Destroy a worker (pthread)
43-- Returns true if sucessful or nil, error_message if failed
44luaproc.destroyworker( <void> )
45
46-- Synchronize workers (pthreads) and exit after all lua processes have ended
47-- No return, finishes execution.
48luaproc.exit( <void> )
49
50-- Set maximum lua processes that should be recycled (default = 0)
51-- Returns true if sucessful or nil, error_message if failed
52luaproc.recycle( <int maxrecycle> )
53
54************************************************************
55* CHILD API *
56* Available only to processes spawned *
57* with luaproc.newproc *
58************************************************************
59
60-- Create a new lua process
61-- Returns true if sucessful or nil, error_message if failed
62luaproc.newproc( <string lua_code> )
63
64-- Create a new worker (pthread)
65-- Returns true if sucessful or nil, error_message if failed
66luaproc.createworker( <void> )
67
68-- Destroy a worker (pthread)
69-- Returns true if sucessful or nil, error_message if failed
70luaproc.destroyworker( <void> )
71
72-- Send a message on a channel
73-- Returns true if sucessful or nil, error_message if failed
74-- Results in blocking if there is no matching receive
75luaproc.send( <string channel_name>, <string msg1>,
76 [string msg2], [string msg3], ... )
77
78-- Receive a message on a channel
79-- Returns message string(s) if sucessful or nil, error_message if failed
80-- Results in blocking if there is no matching send
81-- and the asynchronous flag is not set (nil) or set to false
82luaproc.receive( <string channel_name>, [boolean asynchronous] )
83
84-- Create a new channel
85-- Returns true if sucessful or nil, error_message if failed
86luaproc.newchannel( <string channel_name> )
87
88-- Destroy a channel
89-- Returns true if sucessful or nil, error_message if failed
90luaproc.delchannel( <string channel_name> )
91
92-- Set maximum lua processes that should be recycled (default = 0)
93-- Returns true if sucessful or nil, error_message if failed
94luaproc.recycle( <int maxrecycle> )
95
96<> = mandatory arguments
97[] = optional arguments