Project

Profile

Help

Feature #156

closed

Pave the way to answer to delays

Added by Vincent Le Goff over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
SharpScript
Sprint/Milestone:
% Done:

100%

Company:
-
Contact person:
-
Additional contact persons:
-

Description

CocoMUD is pretty straightforward in execution. Its SharpScript engine executes code as it should in a single, blocking thread. Options like timers, speedwalking and anti-idle would require to be able to pause.

Although all these features don't really need the SharpScript engine extension, it is a good opportunity to provide a #sleep SharpScript function that takes a number as argument and pauses (without blocking). We'll have to use twisted's ability (asynchronous support) in order to do this.

Actions #1

Updated by Vincent Le Goff over 4 years ago

  • Sprint/Milestone set to 17
Actions #2

Updated by Vincent Le Goff over 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

This has been added in commit 5e8923968d253d6ed194399666a0a2e317c94a4d , although the feature can only be used with Python code using the yield keyword:

#alias test {+
    say("This is the first line.")
    yield 5 # Pause 5 seconds and then...
    say("This is the second line.")
}

Please register to edit this issue

Also available in: Atom PDF Tracking page