[En-Nut-Discussion] Asynchronous signals - waking up blocked threads

Ralph Mason ralph.mason at telogis.com
Tue Mar 28 22:25:47 CEST 2006


You can create a new thread that waits on 'something' and posts the 
results to the que.  Or you can poll your io using the que wait for 
message time out.

Ralph

> Ralph Mason wrote:
>> In my applications each worker thread waits on a Message Queue.  When 
>> a configuration change happens a notification is broadcast to all the 
>> message queues.
>
> This sounds like part of a solution. However the worker thread might 
> be blocking in a _read() (serial port or TCP) or a NutTcpAccept call. 
> The _read call can have a time-out but sometimes you want to return 
> before the time-out finishes.
>
> How can you interrupt these in an elegant way?
>
>>
>> Ralph
>>
>>
>>> I am in need for a mechanism to inform blocked threads about changes 
>>> to configuration data. One example is the configuration change of 
>>> the port number of a Telnet server. In the case of a port number 
>>> change, the server has to shut-down and restarted to listen on the 
>>> new TCP port.
>>>
>>> In the POSIX world one can use a signal to unblock a process from 
>>> blocking functions like accept, read or sleep.
>>>
>>> Is there anything similar available in Nut/OS? If not would this be 
>>> a desirable feature and how could it be implemented?
>>>
>>> Henrik
>>> http://www.proconx.com
>>>
>>> _______________________________________________
>>> En-Nut-Discussion mailing list
>>> En-Nut-Discussion at egnite.de
>>> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>>>
>>
>> _______________________________________________
>> En-Nut-Discussion mailing list
>> En-Nut-Discussion at egnite.de
>> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>>
>>
>>
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>




More information about the En-Nut-Discussion mailing list