sharedmap
Version:
Multithreading-compatible SharedMap in vanilla JS
314 lines (115 loc) • 5.22 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: exports</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: exports</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>exports<span class="signature">(maxSize, keySize, objSize)</span><span class="type-signature"> → {SharedMap}</span></h2>
<div class="class-description">SharedMap
zero-dependency
high-performance
unordered
Vanilla JS implementation of SharedMap,
a synchronous multi-threading capable,
fine-grain-locked with deadlock recovery,
static memory allocated,
coalesced-chaining HashMap,
backed by SharedArrayBuffer
that supports deleting
and is capable of auto-defragmenting itself on delete unless almost full
compatible with both Node.js and SharedArrayBuffer-enabled browsers</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">(maxSize, keySize, objSize)</span><span class="type-signature"> → {SharedMap}</span></h4>
<div class="description">
Creates a new SharedMap
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>maxSize</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Maximum number of entries</td>
</tr>
<tr>
<td class="name"><code>keySize</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Maximum length of keys in UTF-16 codepoints</td>
</tr>
<tr>
<td class="name"><code>objSize</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Maximum length of values in UTF-16 codepoints</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li><a href="mailto:momtchil@momtchev.com">Momtchil Momtchev</a></li>
</ul>
</dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line96">line 96</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="http://github.com/mmomtchev/SharedMap">http://github.com/mmomtchev/SharedMap</a></li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SharedMap</span>
</dd>
</dl>
</div>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#clear">clear</a></li><li><a href="global.html#delete">delete</a></li><li><a href="global.html#get">get</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#keys">keys</a></li><li><a href="global.html#length">length</a></li><li><a href="global.html#lockExclusive">lockExclusive</a></li><li><a href="global.html#lockWrite">lockWrite</a></li><li><a href="global.html#map">map</a></li><li><a href="global.html#reduce">reduce</a></li><li><a href="global.html#set">set</a></li><li><a href="global.html#size">size</a></li><li><a href="global.html#unlockExclusive">unlockExclusive</a></li><li><a href="global.html#unlockWrite">unlockWrite</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Sat Aug 22 2020 12:09:51 GMT+0200 (Central European Summer Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>