ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/Semaphore.java
Revision 1.78 - (view) (download) (annotate) - [select for diffs]
Fri Nov 27 17:42:00 2020 UTC (3 years, 5 months ago) by dl
Branch: MAIN
CVS Tags: HEAD
Changes since 1.77: +1 -1 lines
Diff to previous 1.77
Incorporate snippets code improvements from Pavel Rappo

Revision 1.77 - (view) (download) (annotate) - [select for diffs]
Wed Apr 19 23:45:51 2017 UTC (7 years, 1 month ago) by jsr166
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76
Redo @link and @linkplain; one @link was pointing to the wrong poll method

Revision 1.76 - (view) (download) (annotate) - [select for diffs]
Fri Nov 18 12:50:51 2016 UTC (7 years, 6 months ago) by dl
Branch: MAIN
Changes since 1.75: +4 -2 lines
Diff to previous 1.75
Improve drainPermits javadoc

Revision 1.75 - (view) (download) (annotate) - [select for diffs]
Tue Nov 8 00:39:36 2016 UTC (7 years, 6 months ago) by dl
Branch: MAIN
Changes since 1.74: +1 -0 lines
Diff to previous 1.74
Clarify drainPermits spec

Revision 1.74 - (view) (download) (annotate) - [select for diffs]
Tue Aug 30 19:44:46 2016 UTC (7 years, 8 months ago) by jsr166
Branch: MAIN
Changes since 1.73: +7 -7 lines
Diff to previous 1.73
fix code sample indentation

Revision 1.73 - (view) (download) (annotate) - [select for diffs]
Tue Feb 17 18:55:39 2015 UTC (9 years, 3 months ago) by jsr166
Branch: MAIN
Changes since 1.72: +1 -1 lines
Diff to previous 1.72
standardize code sample idiom: * <pre> {@code

Revision 1.72 - (view) (download) (annotate) - [select for diffs]
Sun Jan 18 20:28:32 2015 UTC (9 years, 4 months ago) by jsr166
Branch: MAIN
Changes since 1.71: +3 -3 lines
Diff to previous 1.71
another attempt to improve clarity

Revision 1.71 - (view) (download) (annotate) - [select for diffs]
Fri Jan 16 17:45:52 2015 UTC (9 years, 4 months ago) by jsr166
Branch: MAIN
Changes since 1.70: +1 -1 lines
Diff to previous 1.70
revert nano-copy-paste bug

Revision 1.70 - (view) (download) (annotate) - [select for diffs]
Fri Jan 16 13:32:17 2015 UTC (9 years, 4 months ago) by jsr166
Branch: MAIN
Changes since 1.69: +1 -1 lines
Diff to previous 1.69
whitespace

Revision 1.69 - (view) (download) (annotate) - [select for diffs]
Sun Jan 4 17:00:55 2015 UTC (9 years, 4 months ago) by jsr166
Branch: MAIN
Changes since 1.68: +1 -1 lines
Diff to previous 1.68
consistent wording for "synchronization control" warning

Revision 1.68 - (view) (download) (annotate) - [select for diffs]
Wed Dec 31 07:54:14 2014 UTC (9 years, 4 months ago) by jsr166
Branch: MAIN
Changes since 1.67: +1 -0 lines
Diff to previous 1.67
standardize import statement order

Revision 1.67 - (view) (download) (annotate) - [select for diffs]
Tue Dec 23 13:39:21 2014 UTC (9 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.66: +5 -5 lines
Diff to previous 1.66
Fix markup syntax

Revision 1.66 - (view) (download) (annotate) - [select for diffs]
Tue Dec 23 13:33:52 2014 UTC (9 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.65: +6 -2 lines
Diff to previous 1.65
Documentation improvements

Revision 1.65 - (view) (download) (annotate) - [select for diffs]
Tue Dec 23 11:58:00 2014 UTC (9 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.64: +9 -4 lines
Diff to previous 1.64
Documentation improvements

Revision 1.64 - (view) (download) (annotate) - [select for diffs]
Sun Nov 18 18:03:11 2012 UTC (11 years, 6 months ago) by jsr166
Branch: MAIN
Changes since 1.63: +1 -1 lines
Diff to previous 1.63
normalize whitespace after <p>

Revision 1.63 - (view) (download) (annotate) - [select for diffs]
Sun Oct 21 06:40:20 2012 UTC (11 years, 6 months ago) by jsr166
Branch: MAIN
Changes since 1.62: +0 -1 lines
Diff to previous 1.62
no blank line between javadoc and corresponding code

Revision 1.62 - (view) (download) (annotate) - [select for diffs]
Sun Oct 21 06:14:12 2012 UTC (11 years, 6 months ago) by jsr166
Branch: MAIN
Changes since 1.61: +0 -2 lines
Diff to previous 1.61
delete trailing empty lines of javadoc

Revision 1.61 - (view) (download) (annotate) - [select for diffs]
Tue May 22 23:01:26 2012 UTC (11 years, 11 months ago) by dl
Branch: MAIN
Changes since 1.60: +1 -1 lines
Diff to previous 1.60
Help javadoc resolve link

Revision 1.60 - (view) (download) (annotate) - [select for diffs]
Thu Dec 22 23:20:05 2011 UTC (12 years, 4 months ago) by jsr166
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59
fix imports

Revision 1.59 - (view) (download) (annotate) - [select for diffs]
Thu Jun 9 07:48:43 2011 UTC (12 years, 11 months ago) by jsr166
Branch: MAIN
Changes since 1.58: +2 -4 lines
Diff to previous 1.58
consistent style for code snippets

Revision 1.58 - (view) (download) (annotate) - [select for diffs]
Wed Jun 8 00:50:35 2011 UTC (12 years, 11 months ago) by jsr166
Branch: MAIN
Changes since 1.57: +0 -1 lines
Diff to previous 1.57
clean up imports

Revision 1.57 - (view) (download) (annotate) - [select for diffs]
Tue Mar 15 19:47:03 2011 UTC (13 years, 2 months ago) by jsr166
Branch: MAIN
CVS Tags: release-1_7_0
Changes since 1.56: +1 -1 lines
Diff to previous 1.56
Update Creative Commons license URL in legal notices

Revision 1.56 - (view) (download) (annotate) - [select for diffs]
Fri Oct 22 05:18:31 2010 UTC (13 years, 6 months ago) by jsr166
Branch: MAIN
Changes since 1.55: +1 -1 lines
Diff to previous 1.55
whitespace

Revision 1.55 - (view) (download) (annotate) - [select for diffs]
Mon Sep 27 19:15:15 2010 UTC (13 years, 7 months ago) by jsr166
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54
use blessed declaration modifier order

Revision 1.54 - (view) (download) (annotate) - [select for diffs]
Wed Apr 7 19:24:40 2010 UTC (14 years, 1 month ago) by jsr166
Branch: MAIN
Changes since 1.53: +7 -2 lines
Diff to previous 1.53
6941130: Semaphore should throw if number of permits overflows or underflows

Revision 1.53 - (view) (download) (annotate) - [select for diffs]
Sun May 18 23:47:56 2008 UTC (16 years ago) by jsr166
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52
Sync with OpenJDK; untabify

Revision 1.52 - (view) (download) (annotate) - [select for diffs]
Wed Aug 8 16:42:01 2007 UTC (16 years, 9 months ago) by jsr166
Branch: MAIN
Changes since 1.51: +1 -3 lines
Diff to previous 1.51
6574123: Help implementers of fair synchronizers

Revision 1.51 - (view) (download) (annotate) - [select for diffs]
Thu Apr 20 07:20:10 2006 UTC (18 years, 1 month ago) by jsr166
Branch: MAIN
Changes since 1.50: +136 -133 lines
Diff to previous 1.50
6404123: @link => @linkplain and other minor doc fixes

Revision 1.50 - (view) (download) (annotate) - [select for diffs]
Wed Sep 14 22:54:57 2005 UTC (18 years, 8 months ago) by jsr166
Branch: MAIN
Changes since 1.49: +5 -5 lines
Diff to previous 1.49
happens-before

Revision 1.49 - (view) (download) (annotate) - [select for diffs]
Thu Sep 8 21:58:22 2005 UTC (18 years, 8 months ago) by jsr166
Branch: MAIN
Changes since 1.48: +1 -1 lines
Diff to previous 1.48
whitespace

Revision 1.48 - (view) (download) (annotate) - [select for diffs]
Thu Sep 8 00:04:00 2005 UTC (18 years, 8 months ago) by dl
Branch: MAIN
Changes since 1.47: +1 -1 lines
Diff to previous 1.47
Edit pass for happens-before descriptions

Revision 1.47 - (view) (download) (annotate) - [select for diffs]
Fri Sep 2 01:03:08 2005 UTC (18 years, 8 months ago) by brian
Branch: MAIN
Changes since 1.46: +6 -0 lines
Diff to previous 1.46
Happens-before markup

Revision 1.46 - (view) (download) (annotate) - [select for diffs]
Mon Jun 13 18:41:16 2005 UTC (18 years, 11 months ago) by dl
Branch: MAIN
Changes since 1.45: +6 -0 lines
Diff to previous 1.45
Add serial ids

Revision 1.45 - (view) (download) (annotate) - [select for diffs]
Tue Apr 26 01:17:18 2005 UTC (19 years ago) by jsr166
Branch: MAIN
Changes since 1.44: +34 -34 lines
Diff to previous 1.44
doc fixes

Revision 1.44 - (view) (download) (annotate) - [select for diffs]
Tue Mar 1 01:27:46 2005 UTC (19 years, 2 months ago) by dl
Branch: MAIN
Changes since 1.43: +1 -1 lines
Diff to previous 1.43
Documentation improvements

Revision 1.43 - (view) (download) (annotate) - [select for diffs]
Thu Jun 24 23:55:02 2004 UTC (19 years, 10 months ago) by dl
Branch: MAIN
Changes since 1.42: +20 -19 lines
Diff to previous 1.42
Documentation wording fixes

Revision 1.42 - (view) (download) (annotate) - [select for diffs]
Tue Feb 10 12:16:08 2004 UTC (20 years, 3 months ago) by dl
Branch: MAIN
CVS Tags: JSR166_PFD
Changes since 1.41: +1 -1 lines
Diff to previous 1.41
Wording fixes and improvements

Revision 1.41 - (view) (download) (annotate) - [select for diffs]
Mon Feb 9 13:28:48 2004 UTC (20 years, 3 months ago) by dl
Branch: MAIN
Changes since 1.40: +5 -4 lines
Diff to previous 1.40
Wording fixes and improvements

Revision 1.40 - (view) (download) (annotate) - [select for diffs]
Mon Feb 9 00:23:55 2004 UTC (20 years, 3 months ago) by dl
Branch: MAIN
Changes since 1.39: +7 -8 lines
Diff to previous 1.39
Wording improvements and fixes

Revision 1.39 - (view) (download) (annotate) - [select for diffs]
Sun Jan 11 16:02:17 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.38: +4 -4 lines
Diff to previous 1.38
Simplify/shorten AQS method names

Revision 1.38 - (view) (download) (annotate) - [select for diffs]
Sat Jan 10 20:37:03 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.37: +5 -2 lines
Diff to previous 1.37
Document toString

Revision 1.37 - (view) (download) (annotate) - [select for diffs]
Sat Jan 10 01:41:44 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.36: +9 -0 lines
Diff to previous 1.36
Added toString

Revision 1.36 - (view) (download) (annotate) - [select for diffs]
Fri Jan 9 14:45:17 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.35: +27 -15 lines
Diff to previous 1.35
Cosmetics

Revision 1.35 - (view) (download) (annotate) - [select for diffs]
Thu Jan 8 01:28:48 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.34: +2 -1 lines
Diff to previous 1.34
isFirst->getFirstQueuedThread

Revision 1.34 - (view) (download) (annotate) - [select for diffs]
Wed Jan 7 01:00:51 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.33: +49 -17 lines
Diff to previous 1.33
replace isFirst param with isFirst method

Revision 1.33 - (view) (download) (annotate) - [select for diffs]
Sun Jan 4 22:57:29 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.32: +3 -3 lines
Diff to previous 1.32
Better param names; simpler fairness handling

Revision 1.32 - (view) (download) (annotate) - [select for diffs]
Sun Jan 4 00:56:48 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.31: +1 -1 lines
Diff to previous 1.31
Code walkthrough misc

Revision 1.31 - (view) (download) (annotate) - [select for diffs]
Fri Jan 2 21:02:31 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.30: +22 -6 lines
Diff to previous 1.30
Avoid timeout problems in fair modes; improve AQS method names

Revision 1.30 - (view) (download) (annotate) - [select for diffs]
Fri Jan 2 00:38:33 2004 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29
Use ACS in FutureTask; doc improvements

Revision 1.29 - (view) (download) (annotate) - [select for diffs]
Wed Dec 31 21:30:00 2003 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.28: +23 -10 lines
Diff to previous 1.28
AQS API improvements

Revision 1.28 - (view) (download) (annotate) - [select for diffs]
Tue Dec 30 15:47:48 2003 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.27: +9 -26 lines
Diff to previous 1.27
Avoid cache threashing

Revision 1.27 - (view) (download) (annotate) - [select for diffs]
Mon Dec 29 16:38:06 2003 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.26: +22 -2 lines
Diff to previous 1.26
Clarify tryLock/timeout policy

Revision 1.26 - (view) (download) (annotate) - [select for diffs]
Mon Dec 29 14:19:17 2003 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.25: +5 -8 lines
Diff to previous 1.25
Simplify AQS hook methods

Revision 1.25 - (view) (download) (annotate) - [select for diffs]
Sun Dec 28 15:53:16 2003 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.24: +12 -11 lines
Diff to previous 1.24
Adjust to AQS changes

Revision 1.24 - (view) (download) (annotate) - [select for diffs]
Sat Dec 27 19:26:26 2003 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23
Headers reference Creative Commons

Revision 1.23 - (view) (download) (annotate) - [select for diffs]
Sat Dec 27 17:19:03 2003 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.22: +94 -57 lines
Diff to previous 1.22
Adapt to AbstractQueuedSynchronizer

Revision 1.22 - (view) (download) (annotate) - [select for diffs]
Sat Dec 27 14:48:44 2003 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.21: +53 -38 lines
Diff to previous 1.21
Fix documentation

Revision 1.21 - (view) (download) (annotate) - [select for diffs]
Sat Dec 27 14:15:22 2003 UTC (20 years, 4 months ago) by dl
Branch: MAIN
Changes since 1.20: +35 -281 lines
Diff to previous 1.20
Uses AbstractQueuedSynchronizer instead of cloned code

Revision 1.20 - (view) (download) (annotate) - [select for diffs]
Tue Dec 23 19:38:09 2003 UTC (20 years, 5 months ago) by dl
Branch: MAIN
Changes since 1.19: +3 -1 lines
Diff to previous 1.19
cache finals across volatiles; avoid readResolve; doc improvments; timed invokeAll interleaves

Revision 1.19 - (view) (download) (annotate) - [select for diffs]
Mon Nov 10 17:31:23 2003 UTC (20 years, 6 months ago) by dl
Branch: MAIN
CVS Tags: JSR166_DEC9_POST_ES_SUBMIT, JSR166_DEC9_PRE_ES_SUBMIT
Changes since 1.18: +5 -5 lines
Diff to previous 1.18
Wording and typo cleanup pass

Revision 1.18 - (view) (download) (annotate) - [select for diffs]
Wed Nov 5 12:50:01 2003 UTC (20 years, 6 months ago) by dl
Branch: MAIN
Changes since 1.17: +1 -1 lines
Diff to previous 1.17
Typo fix

Revision 1.17 - (view) (download) (annotate) - [select for diffs]
Mon Nov 3 18:06:51 2003 UTC (20 years, 6 months ago) by dl
Branch: MAIN
CVS Tags: JSR166_NOV3_FREEZE
Changes since 1.16: +1 -1 lines
Diff to previous 1.16
Avoid self-signal

Revision 1.16 - (view) (download) (annotate) - [select for diffs]
Mon Nov 3 13:49:56 2003 UTC (20 years, 6 months ago) by dl
Branch: MAIN
Changes since 1.15: +544 -124 lines
Diff to previous 1.15
Merged FairSemaphore into Semaphore

Revision 1.15 - (view) (download) (annotate) - [select for diffs]
Sat Nov 1 18:36:04 2003 UTC (20 years, 6 months ago) by dl
Branch: MAIN
Changes since 1.14: +20 -3 lines
Diff to previous 1.14
Reworked PriviligedFutureTask; added Semaphore.reducePermits; moved factories

Revision 1.14 - (view) (download) (annotate) - [select for diffs]
Sat Oct 11 15:37:31 2003 UTC (20 years, 7 months ago) by dl
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13
Redeclare some Conditions as ReentrantLock.ConditionObjects

Revision 1.13 - (view) (download) (annotate) - [select for diffs]
Sat Sep 27 12:22:40 2003 UTC (20 years, 7 months ago) by dl
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12
Use "unit" instead of "granularity"; add Executors link to first sentence of TPE

Revision 1.12 - (view) (download) (annotate) - [select for diffs]
Fri Sep 26 11:37:11 2003 UTC (20 years, 7 months ago) by dl
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11
Spellcheck

Revision 1.11 - (view) (download) (annotate) - [select for diffs]
Sun Aug 31 13:33:14 2003 UTC (20 years, 8 months ago) by dl
Branch: MAIN
Changes since 1.10: +0 -3 lines
Diff to previous 1.10
Removed non-standard tags and misc javadoc cleanup

Revision 1.10 - (view) (download) (annotate) - [select for diffs]
Tue Aug 26 00:09:18 2003 UTC (20 years, 8 months ago) by dholmes
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9
In response to Eamonn's comment that "best effort lower bound" is not
defined for waiting times, all such references have been deleted. The
preceding text makes it clear that the time must elapse before the
method will return, and trying to say anything about the maximum waiting
time is pointless. We can still say something to this effect in the package
docs if we want.

Revision 1.9 - (view) (download) (annotate) - [select for diffs]
Mon Aug 25 19:27:58 2003 UTC (20 years, 8 months ago) by dl
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8
serialVersionUIDs

Revision 1.8 - (view) (download) (annotate) - [select for diffs]
Fri Aug 8 20:05:07 2003 UTC (20 years, 9 months ago) by tim
Branch: MAIN
Changes since 1.7: +10 -19 lines
Diff to previous 1.7
Scrunched catch, finally, else clauses.

Revision 1.7 - (view) (download) (annotate) - [select for diffs]
Fri Jul 11 13:12:06 2003 UTC (20 years, 10 months ago) by dl
Branch: MAIN
CVS Tags: JSR166_CR1, JSR166_PRELIMINARY_TEST_RELEASE_2
Changes since 1.6: +2 -5 lines
Diff to previous 1.6
Fair semaphores actually fair now.

Revision 1.6 - (view) (download) (annotate) - [select for diffs]
Wed Jul 9 23:23:17 2003 UTC (20 years, 10 months ago) by dl
Branch: MAIN
Changes since 1.5: +5 -2 lines
Diff to previous 1.5
Misc performance tunings

Revision 1.5 - (view) (download) (annotate) - [select for diffs]
Tue Jul 8 00:46:35 2003 UTC (20 years, 10 months ago) by dl
Branch: MAIN
Changes since 1.4: +2 -1 lines
Diff to previous 1.4
Locks in subpackage; fairness params added

Revision 1.4 - (view) (download) (annotate) - [select for diffs]
Tue Jun 24 14:34:49 2003 UTC (20 years, 10 months ago) by dl
Branch: MAIN
Changes since 1.3: +11 -3 lines
Diff to previous 1.3
Added missing javadoc tags; minor reformatting

Revision 1.3 - (view) (download) (annotate) - [select for diffs]
Fri Jun 6 18:42:17 2003 UTC (20 years, 11 months ago) by dl
Branch: MAIN
CVS Tags: JSR166_PRELIMINARY_TEST_RELEASE_1
Changes since 1.2: +3 -3 lines
Diff to previous 1.2
Added to emulation
Fixed some javadoc format errors

Revision 1.2 - (view) (download) (annotate) - [select for diffs]
Tue May 27 18:14:40 2003 UTC (20 years, 11 months ago) by dl
Branch: MAIN
CVS Tags: JSR166_PRERELEASE_0_1
Changes since 1.1: +95 -9 lines
Diff to previous 1.1
re-check-in initial implementations

Revision 1.1 - (view) (download) (annotate) - [select for diffs]
Wed May 14 21:30:48 2003 UTC (21 years ago) by tim
Branch: MAIN
Moved main source rooted at . to ./src/main
Moved test source rooted at ./etc/testcases to ./src/test

Convenience Links

Links to HEAD: (view) (download) (annotate)

Compare Revisions

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a