Hi,<br><br>I am experiencing some hanging when fs is executing switch_scheduler_add_task.<br><br>switch_scheduler_add_task(switch_epoch_time_now(NULL) , data_flush_callback, "data_flush","core",0,NULL,SSHF_NONE|SSHF_NO_DEL);<br>
<br>I place switch_scheduler_add_task in my SWITCH_MODULE_LOAD_FUNCTION and sometimes, hanging occurs on that particular line. My data_flush_callback is as follows. I debug the module and it does not even enter data_flush_callback. It is hanging at switch_scheduler_add_task(). <br>
<br>SWITCH_STANDARD_SCHED_FUNC(data_flush_callback) {<br><br> switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "starting to flush cdr record...\n");<br><br> int last_sequence = flush_data_to_csv();<br>
if (last_sequence > -1 ) {<br> <br> update_last_seq(last_sequence);<br> }<br> task->runtime = switch_epoch_time_now(NULL) + globals.cycle_time;<br><br>}<br><br>Does anyone know why?<br><br>Thanks,<br>
Mark<br><br>