[Freeswitch-dev] bgapi takes 20ms to return job-id
pawel at voiceworks.pl
Tue Aug 11 02:55:46 PDT 2009
On 2009-08-11, at 10:04, Paweł Pierścionek wrote:
> Is it possible that thread creation takes 20ms or that the job
> thread itself gets it's CPU timeslice before the job-id gets sent
> out (hardly possible with 4 CPU threads) ?
Ok, found it. FS waits for the bgapi thread to get it's timeslice in a
sanity loop before returning the job-id.
Why parse_command waits for it to happen. Even if the thread does not
make it in time nothing changes in the reply.
This makes most of bgapi commands execute before the requester even
gets the job-id back.
Synchronous API is in that case opportunistically faster than BGAPI or
Async EXEC which are deterministically slow.
More information about the FreeSWITCH-dev