Popular recipes tagged "threadsafe" but not "process"http://code.activestate.com/recipes/tags/threadsafe-process/2012-12-06T19:23:11-08:00ActiveState Code Recipessafetkinter.py (Python) 2012-06-05T03:23:47-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578153-safetkinterpy/ <p style="color: grey"> Python recipe 578153 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/threadsafe/">threadsafe</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). </p> <p>Register tkinter classes with threadbox for immediate usage.</p> <p>This module clones several classes from the tkinter library for use with threads. Instances from these new classes should run on whatever thread the root was created on. Child classes inherit the parent's safety.</p> affinity.py (Python) 2012-06-05T03:12:55-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578151-affinitypy/ <p style="color: grey"> Python recipe 578151 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/cpu_usage/">cpu_usage</a>, <a href="/recipes/tags/threadsafe/">threadsafe</a>). </p> <p>Allow a simple way to ensure execution is confined to one thread.</p> <p>This module defines the Affinity data type that runs code on a single thread. An instance of the class will execute functions only on the thread that made the object in the first place. The class is useful in a GUI's main loop.</p> Flexible observer pattern implementation (Python) 2012-12-06T19:23:11-08:00Glenn Eychanerhttp://code.activestate.com/recipes/users/4172294/http://code.activestate.com/recipes/576962-flexible-observer-pattern-implementation/ <p style="color: grey"> Python recipe 576962 by <a href="/recipes/users/4172294/">Glenn Eychaner</a> (<a href="/recipes/tags/event/">event</a>, <a href="/recipes/tags/observer/">observer</a>, <a href="/recipes/tags/pattern/">pattern</a>, <a href="/recipes/tags/publish/">publish</a>, <a href="/recipes/tags/subscribe/">subscribe</a>, <a href="/recipes/tags/threadsafe/">threadsafe</a>). Revision 16. </p> <p>A simple, flexible, general-purpose observer pattern.</p> <p>Observers can be callable objects or objects with a particular named method (handle_notify() by default). Events can be any object, and observers can select which events they are interested in receiving. Support for a number of different types of lightweight event objects is included.</p>