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

Problem with synchronization #38

@alolis

Description

@alolis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions