[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Lua pattern similar to Python multiprocessing?
- From: "Solinsky, Jeff - PAL" <Jeff.Solinsky@...>
- Date: Fri, 7 Sep 2012 11:20:17 -0400
Hi Alexandre,
Someone wrote on stack Overflow concerning luaproc:
"it's not obvious to me how to use the scalar message-passing model to get results ultimately into a parent thread"
I had the same problem with a use case I was dealing with. I liked lua proc due to its simple and light implementation, but my use case had C code that was calling lua, which was triggering a co-routine that needed to send/receive messages to interact with other luaproc threads.
To achieve my desired functionality I had to add features to luaproc to allow sending and receiving messages from the parent thread or any other thread not running from the luaproc scheduler. Additionally, my changes allow using luaproc send/receive from coroutines created from luaproc.newproc() created lua states.
I added an additional luaproc.addproc() function to the api which is to be called from any lua state running from a context not controlled by the luaproc scheduler in order to set itself up with luaproc for sending/receiving messages.
I think others would be interested in luaproc with my changes, I was wondering if you would like to review the changes and possibly pull them into the github project.
I also reviewed the luaproc code and saw some areas of improvement and code reduction, but did not take on further tasks related to it. I just needed to do some multi-threading in lua, and lulaproc seemed like a simple lightweight way to get up and running, though I needed to add the additions for lua states running outside the scheduler to send/receive messages.
Regards,
Jeff Solinsky, B.S. Computer Engineering Technology
--------------------------------
Senior Software Systems Design Engineer
Peek Traffic Corporation
Sustainable Solutions for Traffic Technologies - THINK PEEK
2906 Corporate Way
Palmetto, FL 34221
Phone: (941) 845-1262
Fax: (941) 365-0837
Email: jeff.solinsky@peektraffic.com
website: www.peektraffic.com
-----Original Message-----
From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On Behalf Of Alexandre Skyrme
Sent: Friday, August 24, 2012 1:49 PM
To: lua-l@lists.lua.org
Subject: Re: Lua pattern similar to Python multiprocessing?
phlnc8 <phlnc8 <at> gmail.com> writes:
> What is the status of the very nice luaproc library? Was it "one
> shot" code for the JUCS paper? has it been used in actual
> projects/systems?
hi phil,
luaproc was developed as part of the work for my master's degree -- in fact it
was a development of an idea originally proposed in programming in lua (2nd ed,
chapter 30). we've had a few reports about people who used it or were interested
in doing so, but they were all very informal.
> Looking at the git repository, there is no activity. Is the library
> developed or integrated elsewhere?
i'm currently working on a new version which should be out "really soon now"
(tm); it is part of another student's work, which included a major review of the
first version's code. i'll post an announcement once it is out.
--alexandre