[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: multithreading in an embedded environment
- From: Benoit Germain <bnt.germain@...>
- Date: Sun, 6 Jan 2013 12:23:12 +0100
2013/1/5 Thijs Schreijer <firstname.lastname@example.org>
Lanes might be a good candidate for the job but I don't know its resource usage.
Any ideas, hints or tips?
1 signal and 1 mutex per lane
1 mutex per keeper state
2 signals per Linda
1 global mutex for free-running lanes cleanup management
1 global mutex for lane tracking
2 global mutexes for deep userdata management and metatable caching
lane structure and deep userdata (the actual implementation of a userdata that can be shared between lanes, such as a linda) is allocated through malloc/free
because they can outlive the Lua states that created them. lane and linda structures are very small.
I believe that's about it :-).