<p>In a digital signal acquisition system, often data is pushed into an observer in the system by one thread.  </p>

<p>example from <a href="http://en.wikipedia.org/wiki/Observer_pattern" rel="nofollow noreferrer">Wikipedia/Observer_pattern</a>:</p>

<pre><code>foreach (IObserver observer in observers)
    observer.Update(message);
</code></pre>

<p>When e.g. a user action from e.g. a GUI-thread requires the data to stop flowing, you want to break the subject-observer connection, and even dispose of the observer alltogether.</p>

<p>One may argue: you should just stop the data source, and wait for a sentinel value to dispose of the connection.  But that would incur more latency in the system.</p>

<p>Of course, if the data pumping thread has just asked for the address of the observer, it might find it's sending a message to a destroyed object.</p>

<p>Has someone created an 'official' Design Pattern countering this situation?  Shouldn't they?</p>

You could send a message to all observers informing them the data source is terminating and let the observers remove themselves from the list.
In response to the comment, the implementation of the subject-observer pattern should allow for dynamic addition / removal of observers. In C#, the event system is a subject/observer pattern where observers are added using
```
event += observer
```
and removed using
```
event -= observer
```
.