Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #436 from jmdavis/thread
Browse files Browse the repository at this point in the history
Remove long-deprecated time-related functions.
  • Loading branch information
alexrp committed Mar 9, 2013
2 parents 79ad6b3 + 4fd55f0 commit 063ddb8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 130 deletions.
33 changes: 0 additions & 33 deletions src/core/sync/condition.d
Expand Up @@ -210,39 +210,6 @@ class Condition
}


/**
* $(RED Deprecated. It will be removed in December 2012. Please use the
* version which takes a $(D Duration) instead.)
*
* Suspends the calling thread until a notification occurs or until the
* supplied time period has elapsed.
*
* Params:
* period = The time to wait, in 100 nanosecond intervals. This value may
* be adjusted to equal the maximum wait period supported by the
* target platform if it is too large.
*
* In:
* period must be non-negative.
*
* Throws:
* SyncException on error.
*
* Returns:
* true if notified before the timeout and false if not.
*/
deprecated("Please use the overload of wait which takes a Duration.")
bool wait( long period )
in
{
assert( period >= 0 );
}
body
{
return wait( dur!"hnsecs"( period ) );
}


/**
* Notifies one waiter.
*
Expand Down
35 changes: 0 additions & 35 deletions src/core/sync/semaphore.d
Expand Up @@ -259,41 +259,6 @@ class Semaphore
}


/**
* $(RED Deprecated. It will be removed in December 2012. Please use the
* version which takes a $(D Duration) instead.)
*
* Suspends the calling thread until the current count moves above zero or
* until the supplied time period has elapsed. If the count moves above
* zero in this interval, then atomically decrement the count by one and
* return true. Otherwise, return false.
*
* Params:
* period = The time to wait, in 100 nanosecond intervals. This value may
* be adjusted to equal to the maximum wait period supported by
* the target platform if it is too large.
*
* In:
* period must be non-negative.
*
* Throws:
* SyncException on error.
*
* Returns:
* true if notified before the timeout and false if not.
*/
deprecated("Please use the overload of wait which takes a Duration.")
bool wait( long period )
in
{
assert( period >= 0 );
}
body
{
return wait( dur!("hnsecs")( period ) );
}


/**
* Atomically increment the current count by one. This will notify one
* waiter, if there are any in the queue.
Expand Down
35 changes: 0 additions & 35 deletions src/core/thread.d
Expand Up @@ -1064,41 +1064,6 @@ class Thread
}


/**
* $(RED Deprecated. It will be removed in December 2012. Please use the
* version which takes a $(D Duration) instead.)
*
* Suspends the calling thread for at least the supplied period. This may
* result in multiple OS calls if period is greater than the maximum sleep
* duration supported by the operating system.
*
* Params:
* period = The minimum duration the calling thread should be suspended,
* in 100 nanosecond intervals.
*
* In:
* period must be non-negative.
*
* Example:
* ------------------------------------------------------------------------
*
* Thread.sleep( 500_000 ); // sleep for 50 milliseconds
* Thread.sleep( 50_000_000 ); // sleep for 5 seconds
*
* ------------------------------------------------------------------------
*/
deprecated("Please use the overload of sleep which takes a Duration.")
static void sleep( long period )
in
{
assert( period >= 0 );
}
body
{
sleep( dur!"hnsecs"( period ) );
}


/**
* Forces a context switch to occur away from the calling thread.
*/
Expand Down
27 changes: 0 additions & 27 deletions src/core/thread.di
Expand Up @@ -314,33 +314,6 @@ class Thread
static void sleep( Duration val );


/**
* $(RED Deprecated. It will be removed in December 2012. Please use the
* version which takes a $(D Duration) instead.)
*
* Suspends the calling thread for at least the supplied period. This may
* result in multiple OS calls if period is greater than the maximum sleep
* duration supported by the operating system.
*
* Params:
* period = The minimum duration the calling thread should be suspended,
* in 100 nanosecond intervals.
*
* In:
* period must be non-negative.
*
* Example:
* ------------------------------------------------------------------------
*
* Thread.sleep( 500_000 ); // sleep for 50 milliseconds
* Thread.sleep( 50_000_000 ); // sleep for 5 seconds
*
* ------------------------------------------------------------------------
*/
deprecated("Please use the overload of sleep which takes a Duration.")
static void sleep( long period );


/**
* Forces a context switch to occur away from the calling thread.
*/
Expand Down

0 comments on commit 063ddb8

Please sign in to comment.