Skip to content

Commit

Permalink
Add Hack ASIO docs
Browse files Browse the repository at this point in the history
Fixes #496
  • Loading branch information
JoelMarcey committed Feb 24, 2015
1 parent 9bba5d3 commit e245201
Show file tree
Hide file tree
Showing 50 changed files with 2,018 additions and 0 deletions.
1 change: 1 addition & 0 deletions __docs/phpdoc/doc-base/entities/global.ent
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
<!ENTITY url.hack.vim "https://github.com/hhvm/vim-hack">
<!ENTITY url.haru.lib "http://libharu.org">
<!ENTITY url.hhvm "http://hhvm.com">
<!ENTITY url.hhvm.asio.utilities "https://github.com/hhvm/asio-utilities">
<!ENTITY url.hhvm.manual "http://docs.hhvm.com">
<!ENTITY url.hhvm.downloads "https://github.com/facebook/hhvm">
<!ENTITY url.hhvm.getting-started "https://github.com/facebook/hhvm/wiki/Getting-Started">
Expand Down
1 change: 1 addition & 0 deletions __docs/phpdoc/doc-base/manual.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
&hackref.hackmagic.book;
&hackref.asyncmysql.book;
&hackref.mcrouter.book;
&hackref.asio.book;
</set>

<book xml:id="phplangref">
Expand Down
63 changes: 63 additions & 0 deletions __docs/phpdoc/en/hackref/asio/book.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<book xml:id="book.hack.asio" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<?phpdoc extension-membership="bundled" ?>

<title>Hack Asynchronous I/O Helpers</title>
<titleabbrev>asio</titleabbrev>

<preface xml:id="intro.asio">
&reftitle.intro;
<para>
The ASIO helpers provide convenient functions to use when writing <link linkend="hack.async">async</link> code.
<warning>
<para>
Some of the asio helpers are currently, in our opinion, still a bit unstable. We have moved these to its own <link xlink:href="&url.hhvm.asio.utilities;">HHVM repo</link> where they can be installed as a composer package. In this documentation, helper functions will be noted and pointed to that repo.
</para>
</warning>
</para>
<para>
Here is an overview of the currently built-in, supported API. Use the appropraite method whether you want a vector or map of Awaitables:
<itemizedlist>
<listitem>
<para>
v - Vector
</para>
</listitem>
<listitem>
<para>
m - Map
</para>
</listitem>
</itemizedlist>
</para>
</preface>

&hackref.asio.reference;
&hackref.asio.resultorexceptionwrapper;
&hackref.asio.wrappedexception;
&hackref.asio.wrappedresult;

</book>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
24 changes: 24 additions & 0 deletions __docs/phpdoc/en/hackref/asio/entities.functions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
&hackref.asio.functions.later;
&hackref.asio.functions.m;
&hackref.asio.functions.mc;
&hackref.asio.functions.mcw;
&hackref.asio.functions.mf;
&hackref.asio.functions.mfk;
&hackref.asio.functions.mm;
&hackref.asio.functions.mmk;
&hackref.asio.functions.mw;
&hackref.asio.functions.usleep;
&hackref.asio.functions.v;
&hackref.asio.functions.va;
&hackref.asio.functions.vac;
&hackref.asio.functions.vacw;
&hackref.asio.functions.val;
&hackref.asio.functions.vaw;
&hackref.asio.functions.vc;
&hackref.asio.functions.vcw;
&hackref.asio.functions.vf;
&hackref.asio.functions.vfk;
&hackref.asio.functions.vm;
&hackref.asio.functions.vmk;
&hackref.asio.functions.vw;
&hackref.asio.functions.wrap;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
&hackref.asio.resultorexceptionwrapper.getexception;
&hackref.asio.resultorexceptionwrapper.getresult;
&hackref.asio.resultorexceptionwrapper.isfailed;
&hackref.asio.resultorexceptionwrapper.issucceeded;
5 changes: 5 additions & 0 deletions __docs/phpdoc/en/hackref/asio/entities.wrappedexception.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
&hackref.asio.wrappedexception.construct;
&hackref.asio.wrappedexception.getexception;
&hackref.asio.wrappedexception.getresult;
&hackref.asio.wrappedexception.isfailed;
&hackref.asio.wrappedexception.issucceeded;
5 changes: 5 additions & 0 deletions __docs/phpdoc/en/hackref/asio/entities.wrappedresult.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
&hackref.asio.wrappedresult.construct;
&hackref.asio.wrappedresult.getexception;
&hackref.asio.wrappedresult.getresult;
&hackref.asio.wrappedresult.isfailed;
&hackref.asio.wrappedresult.issucceeded;
39 changes: 39 additions & 0 deletions __docs/phpdoc/en/hackref/asio/functions/later.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<refentry xml:id="hack.asio.function.later" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>later</refname>
<refpurpose>UNSTABLE - SEE DESCRIPTION</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<warning>
<para>
Unstable. See <link xlink:href="&url.hhvm.asio.utilities;">ASIO Helper GitHub repo</link>
</para>
</warning>
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
67 changes: 67 additions & 0 deletions __docs/phpdoc/en/hackref/asio/functions/m.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 330333 $ -->

<refentry xml:id="hack.asio.function.m" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>m&lt;Tk, Tv&gt;</refname>
<refpurpose>Translate a map of awaitables into a single awaitable of map</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>async</modifier>
<type>Awaitable&lt;Map&lt;Tk, Tv&gt;&gt;</type>
<methodname>m</methodname>
<methodparam>
<type>KeyedTraversable&lt;Tk, Awaitable&lt;Tv&gt;&gt;</type>
<parameter>awaitables</parameter>
</methodparam>
</methodsynopsis>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>awaitables</parameter></term>
<listitem>
<para>
The map of awaitables to translate
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Map of awaitables
</para>
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
39 changes: 39 additions & 0 deletions __docs/phpdoc/en/hackref/asio/functions/mc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<refentry xml:id="hack.asio.function.mc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>mc</refname>
<refpurpose>UNSTABLE - SEE DESCRIPTION</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<warning>
<para>
Unstable. See <link xlink:href="&url.hhvm.asio.utilities;">ASIO Helper GitHub repo</link>
</para>
</warning>
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
39 changes: 39 additions & 0 deletions __docs/phpdoc/en/hackref/asio/functions/mcw.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<refentry xml:id="hack.asio.function.mcw" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>mcw</refname>
<refpurpose>UNSTABLE - SEE DESCRIPTION</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<warning>
<para>
Unstable. See <link xlink:href="&url.hhvm.asio.utilities;">ASIO Helper GitHub repo</link>
</para>
</warning>
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
39 changes: 39 additions & 0 deletions __docs/phpdoc/en/hackref/asio/functions/mf.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<refentry xml:id="hack.asio.function.mf" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>mf</refname>
<refpurpose>UNSTABLE - SEE DESCRIPTION</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<warning>
<para>
Unstable. See <link xlink:href="&url.hhvm.asio.utilities;">ASIO Helper GitHub repo</link>
</para>
</warning>
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
39 changes: 39 additions & 0 deletions __docs/phpdoc/en/hackref/asio/functions/mfk.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<refentry xml:id="hack.asio.function.mfk" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>mfk</refname>
<refpurpose>UNSTABLE - SEE DESCRIPTION</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<warning>
<para>
Unstable. See <link xlink:href="&url.hhvm.asio.utilities;">ASIO Helper GitHub repo</link>
</para>
</warning>
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
Loading

0 comments on commit e245201

Please sign in to comment.