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

Idea: rmq.app.async and rmq.app.main #247

Open
jamonholmgren opened this issue Apr 19, 2015 · 3 comments
Open

Idea: rmq.app.async and rmq.app.main #247

jamonholmgren opened this issue Apr 19, 2015 · 3 comments

Comments

@jamonholmgren
Copy link
Member

Idea:

def some_method
  rmq.app.async do
    load_something_that_takes_a_long_time
    rmq.app.main do
      update_the_ui
    end
  end
end

In RedPotion:

def some_method
  app.async do
    load_something_that_takes_a_long_time
    app.main do
      update_the_ui
    end
  end
end

Allow an optional queue name:

def some_method
  app.async queue: "com.clearsightstudio.myapp" do

  end
end

Also the ability to make main synchronous within the current context:

def some_method
  app.async do
    app.main sync: true do
    end
    # won't run this until the above finishes
  end
end

Thoughts?

@twerth
Copy link
Member

twerth commented Apr 20, 2015

That's great. app.main is a bit obscure, however, if you see it without context.

@jamonholmgren
Copy link
Member Author

app.main_thread?

@twerth
Copy link
Member

twerth commented Apr 20, 2015

Me gusta.

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

No branches or pull requests

2 participants