Morris,

The thread dispatcher calls pjsip_endpt_process_rx_data to continue processing 
of the message - http://www.pjsip.org/pjsip/docs/html/group__PJSIP__ENDPT.htm - 
this passes it to the other registered modules e.g. the stateful proxy module.

If you are creating a thread and it immediately dies, then it’s possible that 
it’s run out of work to do. Normally threads will programmed to run in a loop 
handling events until terminated.

Thanks,

Richard

From: yan morris [mailto:morrisyan...@gmail.com]
Sent: 02 September 2016 07:05
To: Richard Whitehouse (projectclearwater.org) 
<richard.whiteho...@projectclearwater.org>
Subject: Re: [Project Clearwater] Is Bono a multi-thread program?

Hi , Richard

Please forgive me that I misunderstand your reply.

I find the thread_dispatcher.cpp file , however , I cannot understand how the 
mod_thread_dispatcher communicate with stateful_proxy_module. Could you explain 
it for me?

In addition , I create the threads , but it would end immediately , do you know 
the reason about this problem?

Thank for your time !

Morris



2016-09-01 1:27 GMT+08:00 yan morris 
<morrisyan...@gmail.com<mailto:morrisyan...@gmail.com>>:
Hi , Richard

Thank for your reply.

Could you please tell me more detailed about implementing multi-thread on Bono ?

Where I can find the codes about creating thread? Because I see the Bono.cpp , 
I only find the high level process

request or response function . Does Clearwater use PJSIP API to make it 
multi-threaded or "mod_stateful_proxy"

is implemented by multi-thread already?

I am trying to use PJSIP write my own sip server as Clearwater's Application 
Server , and I want it multi-threaded .

Therefore I think Bono's source code may help me , but I don't see the codes 
about this.


Hope you can give me a hand.

Thank you very much.

Morris


2016-09-01 0:16 GMT+08:00 Richard Whitehouse 
(projectclearwater.org<http://projectclearwater.org>) 
<richard.whiteho...@projectclearwater.org<mailto:richard.whiteho...@projectclearwater.org>>:
Morris,

Yes, Bono is multi-threaded. It’s architected with a transport thread which 
handles incoming PJSIP requests and a number of worker threads, which SIP 
messages are dispatched onto.

The worker threads are created by thread_dispatcher. By default bono has one 
worker thread per CPU core.

The threads are created using PJSIP’s pj_thread functions.

Thanks,

Richard

From: Clearwater 
[mailto:clearwater-boun...@lists.projectclearwater.org<mailto:clearwater-boun...@lists.projectclearwater.org>]
 On Behalf Of yan morris
Sent: 31 August 2016 17:05
To: 
clearwater@lists.projectclearwater.org<mailto:clearwater@lists.projectclearwater.org>
Subject: [Project Clearwater] Is Bono a multi-thread program?

Hi ,

I want to know , if Bono is a multi-thread program or not.

I see the source code of Bono , I look at the function "proxy_on_rx_request"

which process incoming request , but I don't see any code is creating a new 
thread when request income .

Therefore ,  I want to know if Bono processes request using multi-thread ?

If it does , could you tell where I can find the codes which concerned about?

(or It is implemented by PJSIP , please let me know , too)

Thank you very much

Morris





_______________________________________________
Clearwater mailing list
Clearwater@lists.projectclearwater.org
http://lists.projectclearwater.org/mailman/listinfo/clearwater_lists.projectclearwater.org

Reply via email to