Skip to content

Commit

Permalink
Oh yes we are doing this
Browse files Browse the repository at this point in the history
  • Loading branch information
emreberge committed Feb 12, 2012
1 parent 3a630c0 commit c311b98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions artistcam.rb
Expand Up @@ -5,8 +5,14 @@
trackUserIsListeningTo = Hash.new("Not available") trackUserIsListeningTo = Hash.new("Not available")


get '/:artistURI/session' do get '/:artistURI/session' do
while sessionIds[params[:artistURI]+"_lock"]
sleep 0.1
end

if !sessionIds[params[:artistURI]] if !sessionIds[params[:artistURI]]
sessionIds[params[:artistURI]+"_lock"] = "yay"
sessionIds[params[:artistURI]] = create_session() sessionIds[params[:artistURI]] = create_session()
sessionIds[params[:artistURI]+"_lock"] = false
end end
sessionIds[params[:artistURI]].to_s sessionIds[params[:artistURI]].to_s
end end
Expand Down

0 comments on commit c311b98

Please sign in to comment.