Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Problem with synchronization #38

Open
alolis opened this issue Oct 12, 2011 · 0 comments
Open

Problem with synchronization #38

alolis opened this issue Oct 12, 2011 · 0 comments

Comments

@alolis
Copy link

alolis commented Oct 12, 2011

I have three channels with people on its access list and I am trying to build a global hash with the nicks and their access level from all three channels. In addition, for each nickname i am doing a nickserv glist NICK which returns the grouped nicks for that nickname and i add those to the global staff list as well.

The problem is that sometimes this works and some times it does not because did_receive_notice is being triggered by the next notice request (since the bot is threaded) and the previous request might hasn't complete yet.

I need a way to make did_receive_notice of a specific leaf to be synchronized with all threads and make each thread wait until the previous one is finished and to also ensure that this won't get interrupted by something else. For example if while the list is returned and another notice comes to the bot it will mess with the process of the list parsing (since did_receive_notice will be triggered) so i need to have a way to ensure that this process won't get interrupted.

Is this possible through the autumn framework?

More generally speaking i think these kind of problems should be added in documentation. I find it very difficult to implement various things due to the fact that everything is threaded and I have no way to control the threading whenever I must e.g when i want to receive the access list for a channel and process that list or anything else that returns a lot of lines as result

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant