I am new to erlang. I wonder if it is possible to interrupt a processor in erlang. Assume we have processor x executing a function f1() that takes a long time to execute. I would like to find an efficient way to interrupt the processor x to execute function f2() and after the execution of f2() it goes back to executing f1() from it was interrupted.
这样做的一种方式(尽管并非我所想的)是让1 000人(即1_proc)被一名加工者处决,而1_proc等信息的创建者,如[不间断、f1_被点击等],如果受到干扰,则处决。
然而,这不是我所希望的。 f2()取决于f1(a)? 在本案中,有 f1(a)被搁置, f2(b)被执行,然后有 f1(a)从停止。 我知道我们可以结束一个进程,但我们能够中止这一进程?