GLib.RWLock.writer_trylock

### Method

# GLib RWLockwriter_trylock

since: 2.32

#### Declaration

    gboolean
    g_rw_lock_writer_trylock (
      GRWLock* rw_lock
    )

#### Description

Tries to obtain a write lock on `rw_lock`. If another thread currently holds a read or write lock on `rw_lock`, it immediately returns `FALSE`. Otherwise it locks `rw_lock` and returns `TRUE`.

Available since: 2.32

#### Return value

Type: `gboolean`

`TRUE` if `rw_lock` could be locked.