Permalink
Browse files

Oh yes we are doing this

  • Loading branch information...
1 parent 3a630c0 commit c311b98034b7ef2723200c6757d00a2b27a4e5d4 @emreberge committed Feb 12, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 artistcam.rb
View
@@ -5,8 +5,14 @@
trackUserIsListeningTo = Hash.new("Not available")
get '/:artistURI/session' do
+ while sessionIds[params[:artistURI]+"_lock"]
+ sleep 0.1
+ end
+
if !sessionIds[params[:artistURI]]
+ sessionIds[params[:artistURI]+"_lock"] = "yay"
sessionIds[params[:artistURI]] = create_session()
+ sessionIds[params[:artistURI]+"_lock"] = false
end
sessionIds[params[:artistURI]].to_s
end

0 comments on commit c311b98

Please sign in to comment.