- C
- http://softpixel.com/~cwright/programming/threads/threads.c.php – does not talk about thread pool… hmm… The question is – how to pass a parameter to pthread_create so it does not terminate, and can be reused? what sort of function? It needs to be something *blocking*.
- in PTHREAD - http://people.clarkson.edu/~jmatthew/cs644.archive/cs644.fa2001/proj/pthreadsPool/
- http://en.wikipedia.org/wiki/Apache_Portable_Runtime – unclear whether it has a thread pool… (Apache runs as processes under Linux; it’s only when moving to Win32 that it focus on creating threads)
- http://developers.sun.com/solaris/articles/thread_pools.html – an implementation of the thread pool in C – it has a tpool structure, which holds the following:
- threads (a structure that holds a pointer to a thread that can be updated)
- queues of “work” – probably a thunk
- http://stackoverflow.com/questions/582107/threadpool-best-practices-correctness – also has a simple thread pool implementation
- what we want is a thread pool that will work for a functional programming language VM – most of the things implemented @ this level will have to be just about the only thing that are mutable
- C++
- OpenThread – lightweight C++ threads - http://openthreads.sourceforge.net/
- Intel’s Thread Building Block – appears to be C++ - http://threadingbuildingblocks.org/
- Thread Pool with Boost++ - http://devguy.com/bb/viewtopic.php?t=460
- Boost Thread lib – not sure whether it has a thread pool - http://www.boost.org/doc/libs/1_46_0/doc/html/thread.html
- http://www.codeproject.com/KB/threads/cpthreadpool001.aspx
- http://www.codeproject.com/KB/threads/threads.aspx – a thread lib that works with both pthread & win32 thread
- Event Loop (for checking mouse/keyboard events) - http://www.codeproject.com/KB/cpp/Cross_platform_Event_Loop.aspx
- http://stackoverflow.com/questions/4282773/cross-platform-way-of-yielding-a-thread-in-c-c
- C#
- http://stackoverflow.com/questions/145304/when-to-use-thread-pool-in-c#
- http://blogs.msdn.com/b/pedram/archive/2007/08/05/dedicated-thread-or-a-threadpool-thread.aspx
- http://www.bluebytesoftware.com/blog/2008/07/29/BuildingACustomThreadPoolSeriesPart1.aspx
- http://stackoverflow.com/questions/435668/code-for-a-simple-thread-pool-in-c#
- http://msdn.microsoft.com/en-us/library/ms973903.aspx
Blocking Data Structures
- In order to implement microthreads, we will need to implement blocking data structures that can allow at most one thread inside
- http://stackoverflow.com/questions/801528/thread-safe-blocking-queue-implementation-on-net
- http://www.eggheadcafe.com/articles/20060414.asp – a blocking queue
- http://stackoverflow.com/questions/530211/creating-a-blocking-queuet-in-net/530228#530228 – it should be easy to implement blocking in .NET… it’s C & C++ where things get hard
- http://element533.blogspot.com/2010/01/stoppable-blocking-queue-for-net.html – use a class called Monitor
- http://msdn.microsoft.com/en-us/library/system.collections.queue.synchronized%28VS.71%29.aspx
- http://stackoverflow.com/questions/2476505/thread-safe-data-structure-design
- http://thegordian.blogspot.com/2008/11/how-safe-is-thread-safe-data-structure_02.html
- http://deadtheorywalking.com/SharedLib_Shared_DataStructures.aspx


