Project

General

Profile

Actions

Bug #12661

closed

Multithreading http get doesn't work

Added by orotti (Tim N) about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Target version:
-
[ruby-core:76753]

Description

Hi, I was making this script that was supposed to download all files from my favourite imageboard (2ch.hk)
Everything was normal until I tried to make downloading of these files asynchronous, i.e. in different threads, to improve speed
I tried running this
http://ideone.com/k2l4Hm
but it never works (because of 16th line I suppose)
And sometimes a huge report comes up in my terminal saying that I may have encountered a bug in Ruby
So I decided to write about it here
(the program may not work if the thread was deleted. if that happened, try to take one thread from 2ch.hk/b)


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #12292: Race between OpenSSL::SSL::SSLSocket#stop and #connect can cause a segmentation faultClosedrhenium (Kazuki Yamaguchi)Actions

Updated by rhenium (Kazuki Yamaguchi) about 8 years ago

  • Status changed from Open to Rejected

You can't make multiple requests on a Net::HTTP instance at the same time. You have to open an HTTP connection for each thread.

As for the segmentation fault, in trunk, r55100 should have fixed it ([Bug #12292]).

Actions #3

Updated by rhenium (Kazuki Yamaguchi) about 8 years ago

  • Is duplicate of Bug #12292: Race between OpenSSL::SSL::SSLSocket#stop and #connect can cause a segmentation fault added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0