Results 1 to 1 of 1

Thread: Thread callback

  1. #1
    Junior Member
    Join Date
    Apr 2015
    Posts
    1

    Arrow Thread callback

    Hi all,

    I have been using SourcePro 12.0 as threading library and I am in the need to perform a certain operation on thread local storage data upon thread termination.

    I have been having 2 issues so far:

    1. I register a callback for the RW_THR_TERMINATING state change, but the callback never fires. The thread's state machine identifies 3 states as exit states and the mask I use should catch them all (RW_THR_TERMINATING | RW_THR_EXCEPTION | RW_THR_CANCELING | RW_THR_CALL_REPEATEDLY).
      In order to check that the callback was properly installed I added RW_THR_RUNNING to the mask, and the callback is called in this case. Has anyone had the same issue?
    2. The second issue is the problem I will have if I manage to get around the first issue: the library does not guarantee that the callback is executed by the thread the callback has been registered for. This is an issue for me because the callback has to deal with TLS data. Is there any way to enforce that the callback will be executed by the thread I registered it for?


    Thanks in advance!

    Roberto.
    Last edited by Robertoc; 04-14-2015 at 08:54 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •