[Backgroundrb-devel] Kill my Thread

hemant gethemant at gmail.com
Sun Sep 3 18:25:05 EDT 2006


Following code, should kill the worker thread, if there is a error in
connecting to the database, right?
but in my case it doesn't and goes on doing other stuff. Of course...there
are lots of work arounds for this, but how do i make sure that, the thread
is killed at that point of time.

begin
  @dbh = Mysql.real_connect
("localhost","root","","typo_#{username}", at sql_port, at blog_socket)
rescue Exception => e
  @logger.debug("### Error connecting to the database : #{e.to_s}")
  kill
end

-- 
nothing much to talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060904/7f3686c5/attachment.html 


More information about the Backgroundrb-devel mailing list