Skip to content

Commit

Permalink
add eventloop-less variants of AsyncWork constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Feb 10, 2013
1 parent 69e407b commit d8a5dc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ type SingleAsyncWork <: AsyncWork
this
end
end
SingleAsyncWork(cb::Function) = SingleAsyncWork(eventloop(),cb)

type IdleAsyncWork <: AsyncWork
cb::Function
Expand All @@ -283,6 +284,7 @@ type IdleAsyncWork <: AsyncWork
this
end
end
IdleAsyncWork(cb::Function) = IdleAsyncWork(eventloop(),cb)

type TimeoutAsyncWork <: AsyncWork
cb::Function
Expand All @@ -293,6 +295,7 @@ type TimeoutAsyncWork <: AsyncWork
this
end
end
TimeoutAsyncWork(cb::Function) = TimeoutAsyncWork(eventloop(),cb)

function _uv_hook_close(uv::AsyncStream)
uv.handle = 0
Expand Down

0 comments on commit d8a5dc1

Please sign in to comment.