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. Pawel, _______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org