[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [dsdp-tcf-dev] Send an event from a worker thread
|
Hi Michael,
Yes, using post_event() is the right way to send a tcf event from a
background thread.
Also, if a background thread will hold a pointer to a channel struct,
you should use stream_lock()/stream_unlock() to prevent the struct from
being freed.
Regards,
Eugene
-----Original Message-----
From: dsdp-tcf-dev-bounces@xxxxxxxxxxx
[mailto:dsdp-tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Michael
Sills-Lavoie
Sent: Friday, June 05, 2009 6:44 AM
To: DSDP TCF dev list
Subject: [dsdp-tcf-dev] Send an event from a worker thread
Hi!
I would like to know what is the right way to send a tcf event from a
worker thread in the C agent?
What I'm considering right now is to post an event from the worker
thread(a thread that is not the dispatch one) with the TCFBroadcastGroup
or a specefic channel as parameter.
Then, in the callback function, I would send the data that the thread
wanted to send on the channel (the data would be send in a protected
queue or something like that).
Is this the best way to send data in an event from a thread?
Thank you.
Michael
_______________________________________________
dsdp-tcf-dev mailing list
dsdp-tcf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-tcf-dev