Hi Robert,
I would not mess with signals and threads, as this is not very safe. I
had some issues with SEMS reacting differently on different linux
flavors because of a different behavior of signals related with threads.
If you want to participate in the shutdown process, the easiest way is
to register your helper thread at the AmEventDispatcher
(::addEventQueue(...)).
All you have to do is inheritate your class from AmEventQueueInterface
(and of course implement the few virtual methods provided by this
interface). This way, you will receive an event
(AmSystemEvent::ServerShutdown) when the system is shut down. Please
remember to handle this event asynchronously, as the postEvent() method
would block the caller thread otherwise. Please tell me if you need some
code examples.
Cheers,
Raphael.
Robert Szokovacs wrote:
Hi,
I'm using a helper thread in my plugin that is not associated with any
sessions, and I'd like to get notification and clean up when the sems is
signalled to stop. Is there a way to do it?
TIA
br
Szo
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev