|
From: Stephen S. <rad...@gm...> - 2008-05-05 19:31:48
|
Hi Camille, On Sat, May 3, 2008 at 12:34 PM, Camille Troillard <ca...@os...> wrote: > Hi, > > I would like to know if it is thread safe to call > lo_server_thread_del_method. > I guess from the name of the method that I can safely call it and delete a > method while liblo is processing incoming OSC, right? > > If the answer is no, do you folks have suggestions about how to delete all > methods in a server without stopping and restarting the server? > My goal is to switch a context of methods with the fewest overhead possible. I believe that right now, manipulating methods is not actually thread safe, in that there are no locks around the operation. The quickest safe way to delete methods, I think, is to do it inside a message handler, therefore in the same thread that is checking for new messages. Is that possible for you? I can see some situations where external events want to add and delete methods, but it's probably not ideal for you to have external threads wanting to manipulate the server_thread. Any one else have thoughts on this? Steve |