Skip to content

Commit 080a00e

Browse files
authored
Rename parameter 'generator' to 'callback' in apcu_entry documentation (#4791)
1 parent 9c0b6be commit 080a00e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

reference/apcu/functions/apcu-entry.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@
1212
<methodsynopsis>
1313
<type>mixed</type><methodname>apcu_entry</methodname>
1414
<methodparam><type>string</type><parameter>key</parameter></methodparam>
15-
<methodparam><type>callable</type><parameter>generator</parameter></methodparam>
15+
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
1616
<methodparam choice="opt"><type>int</type><parameter>ttl</parameter><initializer>0</initializer></methodparam>
1717
</methodsynopsis>
1818
<para>
19-
Atomically attempts to find <parameter>key</parameter> in the cache, if it cannot be found <parameter>generator</parameter>
19+
Atomically attempts to find <parameter>key</parameter> in the cache, if it cannot be found <parameter>callback</parameter>
2020
is called, passing <parameter>key</parameter> as the only argument. The return value of the call is then cached with the optionally specified
2121
<parameter>ttl</parameter>, and returned.
2222
</para>
2323
<note>
2424
<simpara>
2525
When control enters <function>apcu_entry</function> the lock for the cache is acquired exclusively, it is released when control leaves <function>apcu_entry</function>:
26-
In effect, this turns the body of <parameter>generator</parameter> into a critical section, disallowing two processes from executing the same code paths concurrently.
26+
In effect, this turns the body of <parameter>callback</parameter> into a critical section, disallowing two processes from executing the same code paths concurrently.
2727
In addition, it prohibits the concurrent execution of any other APCu functions, since they will acquire the same lock.
2828
</simpara>
2929
</note>
3030
<warning>
3131
<simpara>
32-
The only APCu function that can be called safely by <parameter>generator</parameter> is <function>apcu_entry</function>.
32+
The only APCu function that can be called safely by <parameter>callback</parameter> is <function>apcu_entry</function>.
3333
</simpara>
3434
</warning>
3535
</refsect1>
@@ -46,7 +46,7 @@
4646
</listitem>
4747
</varlistentry>
4848
<varlistentry>
49-
<term><parameter>generator</parameter></term>
49+
<term><parameter>callback</parameter></term>
5050
<listitem>
5151
<para>
5252
A callable that accepts <parameter>key</parameter> as the only argument and returns the value to cache.

0 commit comments

Comments
 (0)