java - SimGrid. Receive only specified type of task -
this method receiving сertain type of task host
:
task = task.receive(string mailbox); if (task instanceof sometask): sometask sometesk = (sometask) task; //
but there way receive directly sometask
sometask = sometask.receive(string mailbox)
?
filtering tasks want receive not developed in java in c version of msg (yet).
use anther mailbox not mix tasks, avoid difficulty of sorting them out afterward.
there no trivial example in simgrid examples, several applications use feature. example bittorrent example (that not trivial) use 1 mailbox regular communications intended current host, , mailbox receive messages tracker. way, cannot message random peer when expect message tracker.
Comments
Post a Comment