wp_cache_writers_entry()WPSCache 1.0

No Hooks.

Return

null. Nothing.

Usage

wp_cache_writers_entry();

Code of wp_cache_writers_entry() WPSCache 1.8

function wp_cache_writers_entry() {
	global $mutex, $wp_cache_mutex_disabled, $use_flock;

	if ( defined( 'WPSC_DISABLE_LOCKING' ) || ( isset( $wp_cache_mutex_disabled ) && $wp_cache_mutex_disabled ) ) {
		return true;
	}

	if ( ! $mutex ) {
		wp_cache_debug( '(writers entry) mutex lock not created. not caching.', 2 );
		return false;
	}

	if ( $use_flock ) {
		wp_cache_debug( 'grabbing lock using flock()', 5 );
		flock( $mutex, LOCK_EX );
	} else {
		wp_cache_debug( 'grabbing lock using sem_acquire()', 5 );
		@sem_acquire( $mutex );
	}

	return true;
}