Æѽº ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Stanislav Feldman
Æѽº ű×
Æѽº ¼³¸í
Pactors´Â Python Actors Library.usageFrom Pactors.Core °¡Á® ¿À±â ActorClass MyActor (Actor) : DEF __init __ (ÀÚü, À̸§) : self.name = À̸§ ½´ÆÛ (MyActor, Self) .__ init __ () DEF ¼ö½Å (ÀÚü, ¸Þ½ÃÁö) : Àμâ "% s ¼ö½Å : % s"% (self.name, message) self.kill () a1 = myActor ( "actor1") a1.start () a2 = myActor ( "actor2") a2.start () a1.send (A2, { "¼Û½ÅÀÚ": A1, "MSG": "HI)"}) a2.send (a1, "hello") Actor.Wait_actors () Á¦Ç°ÀÇ È¨ÆäÀÌÁö
Æѽº °ü·Ã ¼ÒÇÁÆ®¿þ¾î