Skip to content

joshuathayer/spot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spot

Simple actor model implementation for PyQt, inspired by thespian, but much simpler.

Actors:

  • have local state
  • receive messages
  • are able to create new actors
  • are able to send messages to other actors

Any class with an act method as shown below can be an actor. Here's a simple actor which keeps track of how many times it's been sent a message, and tells the sum actor its count.

class Counter:

    def __init__(self):
        self.count = 0

    def act(self, msg, tell, create):
        self.count += 1
        tell('sum', self.count)

See example.py for a working example.

About

An actor model for PyQt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages