Skip to content

Threads are hard#1

Open
rlandrito wants to merge 17 commits intoharlan:masterfrom
rlandrito:master
Open

Threads are hard#1
rlandrito wants to merge 17 commits intoharlan:masterfrom
rlandrito:master

Conversation

@rlandrito
Copy link

No description provided.

Reworked some of the network calls to newer, more robust functions.  Not
strictly necessary for ipv6 support but I've been learning them so there
you go...
The user methods will handle current logged in users.  This will later
on be expanded to handle saving users to some permenant storage.  Since
logged in users will be synonymous with threads, there is a thread
handle method where the thread will spend most of its time.

The message queue interface is how the threads talk to each other.
There will be plenty of times that threads need to talk to each other,
for example if someone sends a 'tell' to another user or a simple
broadcast message.  Threads should exclusivly handle input and output to
their network socket, but anyone can write to their queue.
Ok so, mqueues are very much not portable.  They're not on osx.  Pipes
are much more universal, but I don't yet know all the drawbacks.

Renamed the messaging infrastructure to be more generic, in case we
change the backend mechanism in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant