@@ -7,8 +7,6 @@ use uv::iotask;
7
7
use iotask:: IoTask ;
8
8
use comm = core:: comm;
9
9
10
- export delayed_send, sleep, recv_timeout;
11
-
12
10
/**
13
11
* Wait for timeout period then send provided value over a channel
14
12
*
@@ -25,8 +23,8 @@ export delayed_send, sleep, recv_timeout;
25
23
* * ch - a channel of type T to send a `val` on
26
24
* * val - a value of type T to send over the provided `ch`
27
25
*/
28
- fn delayed_send< T : Copy Send > ( iotask : IoTask ,
29
- msecs : uint , ch : comm:: Chan < T > , +val : T ) {
26
+ pub fn delayed_send< T : Copy Send > ( iotask : IoTask ,
27
+ msecs : uint , ch : comm:: Chan < T > , +val : T ) {
30
28
unsafe {
31
29
let timer_done_po = core:: comm:: Port :: < ( ) > ( ) ;
32
30
let timer_done_ch = core:: comm:: Chan ( timer_done_po) ;
@@ -74,7 +72,7 @@ fn delayed_send<T: Copy Send>(iotask: IoTask,
74
72
* * `iotask` - a `uv::iotask` that the tcp request will run on
75
73
* * msecs - an amount of time, in milliseconds, for the current task to block
76
74
*/
77
- fn sleep(iotask: IoTask, msecs: uint) {
75
+ pub fn sleep(iotask: IoTask, msecs: uint) {
78
76
let exit_po = core::comm::Port::<()>();
79
77
let exit_ch = core::comm::Chan(exit_po);
80
78
delayed_send(iotask, msecs, exit_ch, ());
@@ -101,7 +99,7 @@ fn sleep(iotask: IoTask, msecs: uint) {
101
99
* on the provided port in the allotted timeout period, then the result will
102
100
* be a `some(T)`. If not, then `none` will be returned.
103
101
*/
104
- fn recv_timeout<T: Copy Send>(iotask: IoTask,
102
+ pub fn recv_timeout<T: Copy Send>(iotask: IoTask,
105
103
msecs: uint,
106
104
wait_po: comm::Port<T>) -> Option<T> {
107
105
let timeout_po = comm::Port::<()>();
0 commit comments