From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.5 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from mail-io0-x23f.google.com (mail-io0-x23f.google.com [IPv6:2607:f8b0:4001:c06::23f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 737971F428 for ; Fri, 29 Dec 2017 07:25:49 +0000 (UTC) Received: by mail-io0-x23f.google.com with SMTP id c196sf34957268ioc.3 for ; Thu, 28 Dec 2017 23:25:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1514532348; cv=pass; d=google.com; s=arc-20160816; b=pyBY1pJZ4eJU1fNcphET+Tzcp3Z8EOsDWErbsxzhKr5ilVtgugILSKmTPfwCDkqe6x 2IcNPZmmOL0lVk0pkeIT9+Cujvkdm6msnoyRtS+8I9Kl++MzoQHUqhZIGBmMjmwzWVfq MO3mX6iA6YBMMQkYPVGyfVVqj8xGVv4WxnSXIZGQ1zuO1jA8xHz1qqmrO7m0yk43kcAg qqGCoDkJOM5Q3g4hlnQhuG2wVY/7oo8x9E3w1iOk02/YpL9PF80lQxPNgggpTdQELqQ1 0uoEEEgfsMy789+N3eRuuEK482zCvoz8oihaKvcGNifVuOieSFYwoLVBVN9FB+X6e81v l0lg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:references:in-reply-to:mime-version:arc-authentication-results :arc-message-signature:sender:dkim-signature:dkim-signature :arc-authentication-results; bh=i+NTP8oXgYiSp7mWSHMyWqesrNcZvRbK7y2Y7Si4RMA=; b=NK4edT0/FrxC0amUq4FX8jQhdlJRfRldjO8wKykOkLBHED7Mph4WnrGDIsI8028hus uD2bNxjwSFDKpiwZjcUYPpwgDHdQ+mka9052q1e0v7AvIdwuUJETqLrSOwJu+M4zmhfx Yw0KWjMWHvmdQBe+CToTFz6s98l6jCyOVfYrfQ2Okb4znzzPVWrVjB4XjcOvmXlrfRzh vW1+mAUXAeEKWgWWSFfD76PwxtFRZvYHpNYyRXgvyBV29NVyf+J5nEFaa7CdjqOtP+Qs YmCmw+pe7mvFYtV1FgaXpwqPY7EEkL+s79w7jxiFplQc8Hcl3rbH6xjF+Gi+fj8E11E9 V+kQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tEDuPqMc; spf=pass (google.com: domain of jftucker@gmail.com designates 2607:f8b0:4002:c05::241 as permitted sender) smtp.mailfrom=jftucker@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:in-reply-to:references:from:date:message-id :subject:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=i+NTP8oXgYiSp7mWSHMyWqesrNcZvRbK7y2Y7Si4RMA=; b=ZlN6n9K7PZbW3tox3ymztbOSbmclMou0hfj781HTWKuorsFEb4viWYJ98YUd71Gd/9 PMj3wLKtulAu32hTF/KeaDLrku9nqqZdwzkmEZwd4ZiHpWMerXJGene6kvB5lqW/axaz aL6g4sg04qpiWLADlL/u+yj/xVNPXC21gt+c6w78JTkaMBPt4oNBk0vSE2E37zBsLqwD 0r++IR4G6EyBVgucENePI5wp7IcRSshjirxb03lmgjU2KVt0LXzIpveMabLARFhW+Di3 JWzsKAElWHYfS+NaSHUFlEfWlxoSx6iJPu0CdIi7uMGk+9tVVuZnXxtzFB2pKomeQbks zO7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=i+NTP8oXgYiSp7mWSHMyWqesrNcZvRbK7y2Y7Si4RMA=; b=E/Okd4OuK10YTbmQhTu3/l3/KDxC5ThyGC0GUAo6Qq5xf6rJflWxc8ch56ff16q+HN Z2NRhH3HW1gIL5I9/t92NtgoYWhewqI5cIITxB0Kc7PQgzZYOvboxImYE76bPep2R6JP SXRp0hojzncDhh3KzYIY3UykXwy9o5hPm4U7XdP2pZu158uZP/5CvkZLBhGvdUiAEibE QYtEd6b+DJPcoJfIs70Tn30Gwo1+iQEkZ0dDHq556SA2UKeh35JEEH8JwXKjvfv6/0F8 wyaXZDpoTpSiRCUQ8NPL9KW99xRZEACjzj3NwDRmoqAH5V2OAY6+XkvdFZZEhty8MKe6 pzEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:in-reply-to:references:from :date:message-id:subject:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=i+NTP8oXgYiSp7mWSHMyWqesrNcZvRbK7y2Y7Si4RMA=; b=S2T3aymuxpS/2H7qNBFsYkT6WdcDVKo/nk9YOVOXJviymvHj0+3jg0eBE9/9a4m1hn H/O9E29rA5e5vUMmW2/YZy9q7nB87lJdM4P5qUeG6M0kghvBYeO8tthPK5SIMg/vSutW lJVOL5rShKfIuVeeRi/d/YJODZ54i0nZYQx+ICYgOm9DKSW038zBD9RQ050Ar3h+lQoY 1lB0uSEoHjuHCtOXX48OGJQsUtLLgugxml2ln7ihrbdn258jez4VMMb3jjhdPc1Zyssj eu8f5I2vvCNlw6BUUXte0zbMHA+j0wDH5v4GGHH7TiH2nsyZOfEDUWczlU4I3Lje6gWG Jfsw== Sender: rack-devel@googlegroups.com X-Gm-Message-State: AKGB3mIZ7f76V5I7g8KguxPUpeyjpIZt0BgNZoIBANhtQ6eEMjCAuFHa 1xuZO2ilzoQKjhpkXvGZhrE= X-Google-Smtp-Source: ACJfBov8nGJSKM18cNZ+kxs6CXV2X/5NQc7jkcejz4vyJpIu13X04lhkaoLZIzwSixGPR79vNqFCIQ== X-Received: by 10.36.178.88 with SMTP id h24mr418580iti.0.1514532348512; Thu, 28 Dec 2017 23:25:48 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.36.26.88 with SMTP id 85ls3840723iti.6.gmail; Thu, 28 Dec 2017 23:25:48 -0800 (PST) X-Received: by 10.36.151.214 with SMTP id k205mr24941124ite.26.1514532348102; Thu, 28 Dec 2017 23:25:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514532348; cv=none; d=google.com; s=arc-20160816; b=KUdGBGwJMljrC9F8Eu6B3ZuxOn5ERATT/24fQwuEkyk32kj322K6IetQzbkXM35y5D 0MyVjhWSzIW82NExn0TNGhpdfsid1rfRQjpkqjgt9Y0RRFYU/EAYPzEx7dadQCLw+YfF YkSwC/bgKg1g27tVOIyuLCOy3t4hk5I8qLYaGPKBwp+QbbrLK9JKB+g8uBTaQYBSga/J Vn/ALDkM4Xblo8az/J1qzChGrmin6T1Z9FBFcRUWxWLQLVX8W1Xg0eEWCXKQzZeCfv1n +coDUWHHnumOSRTMuYTer/RD9VbZkp5GcXryKlpL3y/9SF2oTzlJL8dnZisWkIPdvgtP L3Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=XHuWHd4b61MAe0VG4LyRgw2+/kAPddk0DDMiZ5sVLKc=; b=D6FH1rp6y3WXJBz0WJHBaYUzQm4m32NtBEupPZIdEMpMOUpVFBP9ffzDdIsBIvRhuk WvBUvGYmBfM8ZMqXZHb6Kg65pHWzqSpIqacS8VgjPSV5jDFKZBw8AJ8KYGL0uf9pTTBw aWnjgWZ3ui5ER2vHWrJmiecj+ffhKF/0ADig43o3G9s2h50Gg5G+6IF5thqfwICqlIcl 5DQXKKsSNcCnDTRtZgYRjXsoFiMBGbCw8/ghpqYnXTs3Y5TDx4ITu/Jk8gYY+6pleQAZ h1zY1U8Cy8aVqh4rChW9Ok7o3Xq0KqPoHloyw040x6dItV9vxVhWYUEXgzDelhleHeqZ yAeQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tEDuPqMc; spf=pass (google.com: domain of jftucker@gmail.com designates 2607:f8b0:4002:c05::241 as permitted sender) smtp.mailfrom=jftucker@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from mail-yw0-x241.google.com (mail-yw0-x241.google.com. [2607:f8b0:4002:c05::241]) by gmr-mx.google.com with ESMTPS id g129si147910itd.1.2017.12.28.23.25.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Dec 2017 23:25:48 -0800 (PST) Received-SPF: pass (google.com: domain of jftucker@gmail.com designates 2607:f8b0:4002:c05::241 as permitted sender) client-ip=2607:f8b0:4002:c05::241; Received: by mail-yw0-x241.google.com with SMTP id r205so9200599ywb.3 for ; Thu, 28 Dec 2017 23:25:48 -0800 (PST) X-Received: by 10.13.205.66 with SMTP id p63mr22560740ywd.343.1514532347339; Thu, 28 Dec 2017 23:25:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.173.215 with HTTP; Thu, 28 Dec 2017 23:25:46 -0800 (PST) Received: by 10.37.173.215 with HTTP; Thu, 28 Dec 2017 23:25:46 -0800 (PST) In-Reply-To: <20171229063427.GA30037@starla> References: <20171229063427.GA30037@starla> From: James Tucker Date: Thu, 28 Dec 2017 23:25:46 -0800 Message-ID: Subject: Re: [PATCH] webrick: remove concurrent-ruby dev dependency To: Rack Development Content-Type: multipart/alternative; boundary="001a114e58a8906b1f0561758aae" X-Original-Sender: jftucker@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tEDuPqMc; spf=pass (google.com: domain of jftucker@gmail.com designates 2607:f8b0:4002:c05::241 as permitted sender) smtp.mailfrom=jftucker@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , --001a114e58a8906b1f0561758aae Content-Type: text/plain; charset="UTF-8" +1 On Dec 28, 2017 10:34 PM, "Eric Wong" wrote: > Using the Queue class in stdlib is sufficient for this test, > so there's no need for a new development dependency. > > And one big reason I like webrick is it's bundled with > Ruby and has no 3rd-party C ext dependencies; so having > to download and install one is a bummer. > --- > If you prefer to use "git pull": > > The following changes since commit ab008307cbb805585449145966989d > 5274fbe1e4: > > Add test to make sure `Rack::Builder#call` always create a new app > (2017-11-06 23:27:12 -0500) > > are available in the Git repository at: > > git://80x24.org/rack.git webrick-devdep > > for you to fetch changes up to 64349662ac18f52849cc215494d77e3719dfa2a7: > > webrick: remove concurrent-ruby dev dependency (2017-12-29 06:25:29 > +0000) > > ---------------------------------------------------------------- > Eric Wong (1): > webrick: remove concurrent-ruby dev dependency > > rack.gemspec | 1 - > test/spec_webrick.rb | 11 +++++------ > 2 files changed, 5 insertions(+), 7 deletions(-) > > diff --git a/rack.gemspec b/rack.gemspec > index ec2b79f6..d8374287 100644 > --- a/rack.gemspec > +++ b/rack.gemspec > @@ -30,6 +30,5 @@ EOF > > s.add_development_dependency 'minitest', "~> 5.0" > s.add_development_dependency 'minitest-sprint' > - s.add_development_dependency 'concurrent-ruby' > s.add_development_dependency 'rake' > end > diff --git a/test/spec_webrick.rb b/test/spec_webrick.rb > index e3050f6f..855fa9eb 100644 > --- a/test/spec_webrick.rb > +++ b/test/spec_webrick.rb > @@ -1,6 +1,6 @@ > require 'minitest/autorun' > require 'rack/mock' > -require 'concurrent/atomic/event' > +require 'thread' > require File.expand_path('../testrequest', __FILE__) > > Thread.abort_on_exception = true > @@ -119,7 +119,7 @@ describe Rack::Handler::WEBrick do > end > > it "provide a .run" do > - latch = Concurrent::Event.new > + queue = Queue.new > > t = Thread.new do > Rack::Handler::WEBrick.run(lambda {}, > @@ -129,13 +129,12 @@ describe Rack::Handler::WEBrick do > :Logger => WEBrick::Log.new(nil, > WEBrick::BasicLog::WARN), > :AccessLog => []}) { |server| > assert_kind_of WEBrick::HTTPServer, server > - @s = server > - latch.set > + queue.push(server) > } > end > > - latch.wait > - @s.shutdown > + server = queue.pop > + server.shutdown > t.join > end > > -- > EW > > -- > > --- > You received this message because you are subscribed to the Google Groups > "Rack Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rack-devel+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "Rack Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. --001a114e58a8906b1f0561758aae Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
+1

On Dec 28, 2017 10:34 PM, "Eric Wong" <e@80x24.org> wrote:
Using the Queue class in stdlib is sufficient for t= his test,
so there's no need for a new development dependency.

And one big reason I like webrick is it's bundled with
Ruby and has no 3rd-party C ext dependencies; so having
to download and install one is a bummer.
---
=C2=A0 If you prefer to use "git pull":

=C2=A0 The following changes since commit ab008307cbb805585449145966989d5274fbe1e4:

=C2=A0 =C2=A0 Add test to make sure `Rack::Builder#call` always create a ne= w app (2017-11-06 23:27:12 -0500)

=C2=A0 are available in the Git repository at:

=C2=A0 =C2=A0 git://80x24.org/rack.git webrick-devdep

=C2=A0 for you to fetch changes up to 64349662ac18f52849cc215494d77e37= 19dfa2a7:

=C2=A0 =C2=A0 webrick: remove concurrent-ruby dev dependency (2017-12-29 06= :25:29 +0000)

=C2=A0 ----------------------------------------------------------------
=C2=A0 Eric Wong (1):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 webrick: remove concurrent-ruby dev dependency<= br>
=C2=A0 =C2=A0rack.gemspec=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 1 -
=C2=A0 =C2=A0test/spec_webrick.rb | 11 +++++------
=C2=A0 =C2=A02 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/rack.gemspec b/rack.gemspec
index ec2b79f6..d8374287 100644
--- a/rack.gemspec
+++ b/rack.gemspec
@@ -30,6 +30,5 @@ EOF

=C2=A0 =C2=A0s.add_development_dependency 'minitest', "~> 5= .0"
=C2=A0 =C2=A0s.add_development_dependency 'minitest-sprint'
-=C2=A0 s.add_development_dependency 'concurrent-ruby'
=C2=A0 =C2=A0s.add_development_dependency 'rake'
=C2=A0end
diff --git a/test/spec_webrick.rb b/test/spec_webrick.rb
index e3050f6f..855fa9eb 100644
--- a/test/spec_webrick.rb
+++ b/test/spec_webrick.rb
@@ -1,6 +1,6 @@
=C2=A0require 'minitest/autorun'
=C2=A0require 'rack/mock'
-require 'concurrent/atomic/event'
+require 'thread'
=C2=A0require File.expand_path('../testrequest', __FILE__)

=C2=A0Thread.abort_on_exception =3D true
@@ -119,7 +119,7 @@ describe Rack::Handler::WEBrick do
=C2=A0 =C2=A0end

=C2=A0 =C2=A0it "provide a .run" do
-=C2=A0 =C2=A0 latch =3D Concurrent::Event.new
+=C2=A0 =C2=A0 queue =3D Queue.new

=C2=A0 =C2=A0 =C2=A0t =3D Thread.new do
=C2=A0 =C2=A0 =C2=A0 =C2=A0Rack::Handler::WEBrick.run(lambda {},
@@ -129,13 +129,12 @@ describe Rack::Handler::WEBrick do
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :Logger =3D> WEBric= k::Log.new(nil, WEBrick::BasicLog::WARN),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :AccessLog =3D> []}= ) { |server|
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0assert_kind_of WEBrick::HTTPServer, serve= r
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 @s =3D server
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 latch.set
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 queue.push(server)
=C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0end

-=C2=A0 =C2=A0 latch.wait
-=C2=A0 =C2=A0 @s.shutdown
+=C2=A0 =C2=A0 server =3D queue.pop
+=C2=A0 =C2=A0 server.shutdown
=C2=A0 =C2=A0 =C2=A0t.join
=C2=A0 =C2=A0end

--
EW

--

---
You received this message because you are subscribed to the Google Groups &= quot;Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to rack-d= evel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups &= quot;Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to
rack-dev= el+unsubscribe@googlegroups.com.
For more options, visit http= s://groups.google.com/d/optout.
--001a114e58a8906b1f0561758aae--