# `GSGlyph initLock`

*Instance Method*

Prepares the glyph for synchronized access.

## Declaration

```swift
func initLock()
```

```objc
- (void) initLock;
```

```python
initLock()
```

## Discussion

Glyphs added to a font are prepared automatically. Call this before sharing a detached glyph between threads.

## See Also

### Locking

- [`GSGlyph setLockedFast:`](/Core/GlyphsCore/GSGlyph/setLockedFast:) — Changes whether editing the glyph is disabled without registering undo.
- [`GSGlyph hasLock`](/Core/GlyphsCore/GSGlyph/hasLock) — Whether the glyph has been prepared for synchronized access.
- [`GSGlyph lockRead`](/Core/GlyphsCore/GSGlyph/lockRead) — Acquires shared access to glyph-level cached state.
- [`GSGlyph unlockRead`](/Core/GlyphsCore/GSGlyph/unlockRead) — Releases shared access acquired with [`GSGlyph lockRead`](/Core/GlyphsCore/GSGlyph/lockRead).
- [`GSGlyph lockWrite`](/Core/GlyphsCore/GSGlyph/lockWrite) — Acquires exclusive access to glyph-level cached state.
- [`GSGlyph unlockWrite`](/Core/GlyphsCore/GSGlyph/unlockWrite) — Releases exclusive access acquired with [`GSGlyph lockWrite`](/Core/GlyphsCore/GSGlyph/lockWrite).
- [`GSGlyph lockReadLayers`](/Core/GlyphsCore/GSGlyph/lockReadLayers) — Acquires shared access to the layer collection.
- [`GSGlyph unlockReadLayers`](/Core/GlyphsCore/GSGlyph/unlockReadLayers) — Releases shared access acquired with [`GSGlyph lockReadLayers`](/Core/GlyphsCore/GSGlyph/lockReadLayers).
- [`GSGlyph lockWriteLayers`](/Core/GlyphsCore/GSGlyph/lockWriteLayers) — Acquires exclusive access to the layer collection.
- [`GSGlyph unlockWriteLayers`](/Core/GlyphsCore/GSGlyph/unlockWriteLayers) — Releases exclusive access acquired with [`GSGlyph lockWriteLayers`](/Core/GlyphsCore/GSGlyph/lockWriteLayers).

