Re: Tasks - communication

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...
useless_ said...
boater said...

Started playing around with tasks, which seem to offer a lot of possibilities for programming round parallel activities like long lasting i/o.

Are there any posts/ thoughts on inter-task communications, or messaging, that anyone can point me to?


I was working on this a few years ago, on Eu v4.0b2. I had task-to-task and global broadcasts working, in March 2010. There was a lot of opposition to communication between tasks, so i quit working on it.

Kat, I don't think you are correct with that assertion. Can you tell me exactly what was the opposition you are referring to? And how do you define "a lot of opposition" in this context?

I think that having inter-task communication is imperative, especially for safe access to shared data between tasks.

I like the D Programming Language's approach to this, namely that all data is assumed to be shared between tasks unless explicitly said otherwise.


Ok, force me to think of the depressing events. I think it went something like this: code i contributed for strtok was un-needed, code i contributed for http.e was overwritten, code i was writing for irc.e was recieved with "who needs irc?" and derisions of a mirc clone, and when tasks.e was finalised i was told someone in the dev team would now do taskmsgs.e and my code wasn't worth looking at. My taskmsgs.e worked two years ago. Over two yrs ago i had http.e task-aware, and that contribution was rejected till just last month!

The msgs are tagged with from_who and to_who (and anything else, like origin and expiry times), a task can be polite and query only for it's own id, or it can query for other task id if it knows them (this is unlikely). A global broadcast of a task_msg is simply a msg with all known (known to taskmsgs.e, not necessarily known to each task) task_ids in the to_who field. After a msg is recieved by a task, the msg is deleted from the handler (or for globals, that task's id is deleted from that to_who). Tasks can ask for msgs only from certain id, or get them in order of time sent, or private msgs before globals.

It was a cute piece of code, pretty small too. I was proud of it. I was so stupid to think humans wanted it. Last save was March 13, 2010. I have not looked at it or used it since.

useless
Forked into: Re: Tasks - communication

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu