I sent letters on my application (ruby 1.8.7, rails 2.3.2) like this Thread.new{UserMailer.deliver_signup_notification(user)}
Thread.new{UserMailer.deliver_signup_notification(user)}
Since ruby ββuses green threads, is there any kind of performance advantage, or can I just use UserMailer.deliver_signup_notification(user) ?
UserMailer.deliver_signup_notification(user)
thanks
Global VM locking will still almost certainly be applied when sending this message, which does not mean any difference.
You should not start threads in a request / response cycle. You should not start topics at all if you cannot observe their creation in order to join, and even then it is rarely worth what it creates.
Rails . , Rails 2.3 , -, environment.rb config.threadsafe!.
. , BackgroundRb .
, . ; , -.
, Rails, , deliver_signup_notification , ( ). , , , .
, , deliver_signup_notification . , .
, Rails- . Rails DRb ( ) . - . Google .
, ( 2.2.2). , ( 20 , , 150 ).
, , , , Google.
- , , .
, .
Source: https://habr.com/ru/post/1705361/More articles:Why does my Perl script complain about the "global symbol" $ connection "requires an explicit package name"? - perlDeleteOnSubmit LINQ exception "Unable to add object with key that is already in use" - c #HABTM Tables 2 2 different relationships - ruby-on-railsHow to visualize depth texture in OpenGL? - openglSwitch image display in UITableViewCell - iphoneRecommended heading boost? - luceneScript to download emails from Gmail and save to SQL server? - c #Telerik RadGrid opens an additional form for editing pop-ups by pressing "enter" from a pop-up form for insertion - telerikclass of constants in php - phpHow do you use Team Foundation Build to create multiple environments? - tfsAll Articles