<commit_before># Interface changes

## Proposed interface changes for 1.10

Status: To be discussed

### Server interface

#### mg\_start / mg\_init\_library

Calling mg\_init\_library is recommended before calling mg\_start.

Compatibility:
Initially, mg\_init\_library will be called implicitly if it has 
not been called before mg\_start.
If mg\_init\_library was not called, mg\_stop may leave memory leaks.

#### mg\_websocket\_write functions

Calling mg\_lock\_connection is no longer called implicitly
in mg\_websocket\_write functions. 
If you use websocket write functions them from two threads,
you must call mg\_lock\_connection explicitly, just like for any
other connection.
<commit_msg>Docs: Link interface changes to #544<commit_after># Interface changes

## Proposed interface changes for future versions

See [this GitHub issue](https://github.com/civetweb/civetweb/issues/544).


### Server interface

#### mg\_start / mg\_init\_library

Calling mg\_init\_library is recommended before calling mg\_start.

Compatibility:
Initially, mg\_init\_library will be called implicitly if it has 
not been called before mg\_start.
If mg\_init\_library was not called, mg\_stop may leave memory leaks.

#### mg\_websocket\_write functions

Calling mg\_lock\_connection is no longer called implicitly
in mg\_websocket\_write functions. 
If you use websocket write functions them from two threads,
you must call mg\_lock\_connection explicitly, just like for any
other connection.

{'fraction_non_alphanumeric': 0.07599193006052454, 'fraction_numerical': 0.00605245460659045, 'mean_word_length': 4.7011494252873565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '752177', 'n_tokens_mistral': 411, 'n_tokens_neox': 390, 'n_words': 168}