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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -