import { IMailbox } from "./mailbox" ; import { PID } from "./pid" ; import { IProcess } from "./process" ; import * as messages from "./messages" ; export class LocalProcess implements IProcess { public IsDead : boolean ; constructor ( private Mailbox ) { } SendUserMessage ( pid , message , sender ? ) { if ( sender ) { this . Mailbox . PostUserMessage ( new messages . MessageSender ( message , sender ) ) ; } this . Mailbox . PostUserMessage ( message ) ; } SendSystemMessage ( pid , message ) { this . Mailbox . PostSystemMessage ( message ) ; } Stop ( pid ) { this . SendSystemMessage ( pid , messages . Stop . Instance ) ; } }