i made it work more or less, basically i got confused because msgpack-rpc-d has "VibeCustomMain" set, which i didn't notice, so i needed to manually call runEventLoop.

the remaining question is on how to start a runWorkerTask and share its tId with later spawned Tasks.
when i call runWorkerTaskH from main it fails as there is no valid tID in main. as a temporary solution
i wrapped runWorkerTaskH (and runTask for spawning a server) into another runTask but then i get

[warn] eventbaseloop: reentrant invocation. Only one eventbaseloop can run on each event_base at once.

which i guess is not optimal.

=> how can i share a WorkerTask's id with tasks started from main (so those can message the worker)?

On Sat, 06 Dec 2014 16:27:49 GMT, yawniek wrote:

how is it possible to start both, a webserver and listening to a tcp socket and then have those
communicating with a separate worker thread.

essentially what i want to do is have a Rest API and a msgpack-rpc that can put/set values into leveldb.
thus leveldb shall run in another thread and both, the web and rpc interface should be able to communicate with it.

i'm more or less stuck in that when i call listenTCP (via msgpack-rpc-d's TCPServer) in main/this there is no valid Task.getThis() and thus runWorkerTaskH fails.