work_queue 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/work_queue.rb +3 -20
- data/test/tc_work_queue.rb +0 -16
- metadata +4 -4
data/lib/work_queue.rb
CHANGED
@@ -2,30 +2,13 @@ require 'thread'
|
|
2
2
|
require 'monitor'
|
3
3
|
|
4
4
|
##
|
5
|
-
#
|
6
|
-
# WorkQueue
|
5
|
+
# A tunable work queue, designed to coordinate work between a producer and a pool of worker threads.
|
7
6
|
#
|
8
|
-
# == Description
|
9
|
-
# This file contains an implementation of a work queue structure.
|
10
|
-
#
|
11
|
-
# == Version
|
12
|
-
# 2.5.1
|
13
|
-
#
|
14
|
-
# == Author
|
15
|
-
# Miguel Fonseca <contact@miguelfonseca.com>
|
16
|
-
#
|
17
|
-
# == Copyright
|
18
|
-
# Copyright 2012 Miguel Fonseca
|
19
|
-
#
|
20
|
-
# == License
|
21
|
-
# MIT (see LICENSE file)
|
22
|
-
#
|
23
|
-
|
24
7
|
class WorkQueue
|
25
|
-
VERSION = "2.5.
|
8
|
+
VERSION = "2.5.2"
|
26
9
|
|
27
10
|
##
|
28
|
-
# Creates
|
11
|
+
# Creates an empty work queue with the desired parameters.
|
29
12
|
# It's generally recommended to bound the resources used.
|
30
13
|
#
|
31
14
|
# ==== Parameter(s)
|
data/test/tc_work_queue.rb
CHANGED
@@ -1,19 +1,3 @@
|
|
1
|
-
##
|
2
|
-
# = Name
|
3
|
-
# TC_WorkQueue
|
4
|
-
#
|
5
|
-
# == Description
|
6
|
-
# This file contains unit tests for the WorkQueue class.
|
7
|
-
#
|
8
|
-
# == Author
|
9
|
-
# Miguel Fonseca <contact@miguelfonseca.com>
|
10
|
-
#
|
11
|
-
# == Copyright
|
12
|
-
# Copyright 2012 Miguel Fonseca
|
13
|
-
#
|
14
|
-
# == License
|
15
|
-
# MIT (see LICENSE file)
|
16
|
-
|
17
1
|
require 'test/unit'
|
18
2
|
require 'lib/work_queue'
|
19
3
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: work_queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 2.5.
|
9
|
+
- 2
|
10
|
+
version: 2.5.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Miguel Fonseca
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-04-
|
18
|
+
date: 2012-04-22 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description:
|