【发布时间】:2013-06-15 22:54:56
【问题描述】:
我使用 EUNIT 模块并包括“eunit/include/eunit.hrl”。我使用参数 func/0 调用 spawn/1 以在测试函数中生成一个新进程,并在新进程中调用 io:format/1 。参数 func/0 是这样的递归函数:
func() ->
A = 2,
io:format("#######~p~n", [A]),
timer:sleep(1000),
func().
然后
10> bt:test().
All 2 tests passed.
ok
11>
=ERROR REPORT==== 19-Jun-2013::19:50:54 ===
Error in process <0.122.0> with exit value: {terminated,[{io,format,[<0.121.0>,"
#######~p~n",[2]],[]},{bt,func,0,[{file,"bt.erl"},{line,6}]}]}
出了什么问题,我该怎么办?
【问题讨论】:
标签: erlang