Most viewed recipes tagged "observer" and "threads"http://code.activestate.com/recipes/tags/observer+threads/views/2010-03-13T12:17:11-08:00ActiveState Code RecipesThreadsafe observer pattern implemented as descriptor (Python)
2010-03-13T12:17:11-08:00Rodney Drenthhttp://code.activestate.com/recipes/users/4050661/http://code.activestate.com/recipes/577106-threadsafe-observer-pattern-implemented-as-descrip/
<p style="color: grey">
Python
recipe 577106
by <a href="/recipes/users/4050661/">Rodney Drenth</a>
(<a href="/recipes/tags/descriptor/">descriptor</a>, <a href="/recipes/tags/observer/">observer</a>, <a href="/recipes/tags/publish/">publish</a>, <a href="/recipes/tags/subscribe/">subscribe</a>, <a href="/recipes/tags/threads/">threads</a>).
</p>
<p>This is a threadsafe version of <a href="http://code.activestate.com/recipes/576979/">recipe 576979</a>. A publish-subscribe (observer) pattern is implemented as a descriptor. Assigning a value notifies the observers.
Uses <a href="http://code.activestate.com/recipes/577105/">recipe 577105</a> as synchlock.py and <a href="http://code.activestate.com/recipes/576979/">recipe 576979</a> as Observer.py</p>