pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:2978:    pike_throw();    }    }   }      /*! @decl void interrupt()    *! @decl void interrupt(string msg)    *!    *! Interrupt the thread with the message @[msg].    *! +  *! This function causes the thread to throw an error +  *! where the message defaults to @expr{"Interrupted.\n"@}. +  *!    *! @fixme    *! The argument @[msg] is currently ignored.    *!    *! @note    *! Interrupts are asynchronous, and are currently not queued. -  +  *! +  *! @note +  *! Due to the asynchronous nature of interrupts, it may take +  *! some time before the thread reacts to the interrupt.    */   static void f_thread_id_interrupt(INT32 args)   {    /* FIXME: The msg argument is not supported yet. */    pop_n_elems(args);       if (!(THIS_THREAD->flags & THREAD_FLAG_SIGNAL_MASK)) {    num_pending_interrupts++;    if (!thread_interrupt_callback) {    thread_interrupt_callback =
pike.git/src/threads.c:3019:    }    th->flags |= THREAD_FLAG_TERM;   }      /*! @decl void kill()    *!    *! Interrupt the thread, and terminate it.    *!    *! @note    *! Interrupts are asynchronous, and are currently not queued. +  *! +  *! @note +  *! Due to the asynchronous nature of interrupts, it may take +  *! some time before the thread reacts to the interrupt.    */   static void f_thread_id_kill(INT32 args)   {    pop_n_elems(args);    low_thread_kill (THIS_THREAD);   }      void init_thread_obj(struct object *UNUSED(o))   {    memset(&THIS_THREAD->state, 0, sizeof(struct Pike_interpreter_struct));