Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (18 sloc) 0.591 kb

Queue

Implements a simple function to wait until task is put into a queue. The queue will be deleted once dequeued.

Starting server with extension

> ttserver -ext wait_queue test.tch

Executing from command line (subscriber)

> tcrmgr ext localhost wait_queue foo 1

# Waits until enqueue is called.

> bar

Executing from command line (publisher)

> tcrmgr ext localhost enqueue foo bar
> bar

Executing via Ruby (subscriber)

> ruby wait_queue.rb

# Waits until enqueue is called.

> bar

Executing via Ruby (publisher)

> ruby enqueue.rb
> bar
Jump to Line
Something went wrong with that request. Please try again.