Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make_scheduled error #645

Closed
aviks opened this issue Mar 28, 2012 · 2 comments
Closed

make_scheduled error #645

aviks opened this issue Mar 28, 2012 · 2 comments

Comments

@aviks
Copy link
Member

aviks commented Mar 28, 2012

The following code does not work. Is it expected to?

function c() 
  while (true)
        println("In a task")
         yield()
    end
end

c1 = Task(c)
make_scheduled(c1);
yield()

This results in:

$ ./julia test.jl 
no method c((),)
 in method_missing at base.jl:60
at test.jl:12
 in include at src/boot.jl:198
 in process_options at client.jl:169
 in _start at client.jl:207

However, the following code works. It correctly yields back into the task at last line, after make_scheduled.

function c() 
    while (true)
         println("In a task")
         yield()
     end
end

c1 = Task(c)
consume(c1) #Hack to make make_scheduled work
make_scheduled(c1);
yield()
@JeffBezanson
Copy link
Sponsor Member

Fixed in commit 46fde51.

@aviks
Copy link
Member Author

aviks commented Mar 28, 2012

ah.. thanks! works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants