ruby - Sinatra design pattern -


i'm trying implement sintra design pattern, can't wrap head around current implementation.

take code example.

get "/path1"   # stuff end  "/path2"   # stuff end 

how come first call get doesn't block main thread?

i'm trying implement similar.

work("some data 1") work("some data 2") work("some data 3") 

here, want add "some data n" kind of queue, when there isn't more work calls want start processing data. not want call app.start in end of file`.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -