Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queues with threads #13

Open
Iver1988 opened this issue Feb 11, 2017 · 0 comments
Open

Queues with threads #13

Iver1988 opened this issue Feb 11, 2017 · 0 comments

Comments

@Iver1988
Copy link
Member

Iver1988 commented Feb 11, 2017

Queues

  • "speaking" queue is using 2-dimensional array with texts and priority. Priorities are Disabled, Low, Normal and High. Low are used for not much important info like Robbies random conversations, normal for standard results and high for very important informations like "I have no power source and battery is on 10%" for example. Disabled is used for special cases, when user can tell "Disable battery notifications" for example. First item in queue is actual output which stays until text is written and spoken. After that, first item is removed and first one with highest priority is processed using "speak" method in "speaking" thread. Exclude disabled, which are not removed completely, but waiting to potential change back to Low, Normal or High. Priority can be changed using modules except first one in queue which is running actually.

Threads

  • "speaking" thread is special thread for speech of text. It takes texts from "speaking" queue, displays them, use text to speech on them and take another one. When no items in queue, it waits.
  • "listening" thread is special thread for listening of inputs from user. When command for stopping of speak is used, text with stoping of talking is added to "speaking" queue and actual text to speed method in "speaking" thread is stopped.
  • Other threads have own names and are used for modules purposes.
@Iver1988 Iver1988 self-assigned this Feb 11, 2017
@Iver1988 Iver1988 added this to the Communication update milestone Feb 11, 2017
@Iver1988 Iver1988 mentioned this issue Feb 12, 2017
@Iver1988 Iver1988 removed their assignment Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant