One mechanism would be to create the object in a single thread, and then provide an API to it. Create a shared-data area to pass request/response data. Use semaphores to protect the shared-data, and to have the Bayes-thread wait on.
- acquire shared-data semaphore
- fill in shared-data request
- hit Bayes-thread semaphore
- Bayes-thread reads request, posts response
- requester reads response and frees shared-data semaphore