[ndnSIM] multithread issue in ndnsim

Alex Afanasyev alexander.afanasyev at ucla.edu
Tue Sep 17 21:10:52 PDT 2013

Hi JackWee,

Generally, and unless very very carefully used for specific subsets of tasks, threads cannot be used in NS-3 simulation.  Therefore, it is "normal" that NS-3 segfaults.

If you need to do something "in parallel", you should schedule two event to be run at the same time and NS-3 will take care that they "run" at the same simulation time (each event in NS-3 always takes 0 simulation time).


On Sep 17, 2013, at 6:43 PM, JackWee <jackwee_yao at 163.com> wrote:

> Hi Alex
> We`re intend to create a forward strategy which some thread function would be used to implement it.
> So we write some lines as follow:
> pthread_create(&id_1,NULL,a.OnProbe,&(para));
> pthread_create(&id_2,NULL,a.TimeCount,&(para_1));
> pthread_join(id_1,NULL);
> pthread_join(id_2,NULL);
> Everything is OK while ./waf --run,but something weird happened when Simulate(F3).
> After the program run for few seconds,the message below appeared.
> <hialex.jpg>
> we tried a lot to solve it,but failed.Any suggestion???Thanks a lot!!!
>                                           &nb! sp;   ;                                                                                              sincerely
>                                                                                                                                            JackWee

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130917/7273f74c/attachment.html>

More information about the ndnSIM mailing list