summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-09-18 11:54:38 -0700
committerRider Linden <rider@lindenlab.com>2015-09-18 11:54:38 -0700
commita8ab084678aa36b38e1df74c8addf666a2774d3b (patch)
treee16f7076b9e0ca0d265b96221756894cebb22121 /indra/llcommon
parent75c6549fde060e974c90636685962ee373f94202 (diff)
Tweek to naming postEventAndSuspend -> postAndSuspend
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-xindra/llcommon/lleventcoro.cpp18
-rwxr-xr-xindra/llcommon/lleventcoro.h22
-rwxr-xr-xindra/llcommon/tests/lleventcoro_test.cpp8
3 files changed, 24 insertions, 24 deletions
diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp
index 031c2cffb0..c9bfcacedc 100755
--- a/indra/llcommon/lleventcoro.cpp
+++ b/indra/llcommon/lleventcoro.cpp
@@ -73,7 +73,7 @@ std::string listenerNameForCoro()
}
/**
- * Implement behavior described for postEventAndSuspend()'s @a replyPumpNamePath
+ * Implement behavior described for postAndSuspend()'s @a replyPumpNamePath
* parameter:
*
* * If <tt>path.isUndefined()</tt>, do nothing.
@@ -153,7 +153,7 @@ void llcoro::suspend()
suspendUntilEventOn("mainloop");
}
-LLSD llcoro::postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requestPump,
+LLSD llcoro::postAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requestPump,
const LLEventPumpOrPumpName& replyPump, const LLSD& replyPumpNamePath)
{
// declare the future
@@ -171,7 +171,7 @@ LLSD llcoro::postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName&
// request event.
LLSD modevent(event);
storeToLLSDPath(modevent, replyPumpNamePath, replyPump.getPump().getName());
- LL_DEBUGS("lleventcoro") << "postEventAndSuspend(): coroutine " << listenerName
+ LL_DEBUGS("lleventcoro") << "postAndSuspend(): coroutine " << listenerName
<< " posting to " << requestPump.getPump().getName()
<< LL_ENDL;
@@ -179,7 +179,7 @@ LLSD llcoro::postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName&
// << ": " << modevent << LL_ENDL;
requestPump.getPump().post(modevent);
}
- LL_DEBUGS("lleventcoro") << "postEventAndSuspend(): coroutine " << listenerName
+ LL_DEBUGS("lleventcoro") << "postAndSuspend(): coroutine " << listenerName
<< " about to wait on LLEventPump " << replyPump.getPump().getName()
<< LL_ENDL;
// trying to dereference ("resolve") the future makes us wait for it
@@ -189,7 +189,7 @@ LLSD llcoro::postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName&
llcoro::Suspending suspended;
value = *future;
} // destroy Suspending as soon as we're back
- LL_DEBUGS("lleventcoro") << "postEventAndSuspend(): coroutine " << listenerName
+ LL_DEBUGS("lleventcoro") << "postAndSuspend(): coroutine " << listenerName
<< " resuming with " << value << LL_ENDL;
// returning should disconnect the connection
return value;
@@ -242,7 +242,7 @@ WaitForEventOnHelper<LISTENER> wfeoh(const LISTENER& listener, int discriminator
namespace llcoro
{
-LLEventWithID postEventAndSuspend2(const LLSD& event,
+LLEventWithID postAndSuspend2(const LLSD& event,
const LLEventPumpOrPumpName& requestPump,
const LLEventPumpOrPumpName& replyPump0,
const LLEventPumpOrPumpName& replyPump1,
@@ -270,12 +270,12 @@ LLEventWithID postEventAndSuspend2(const LLSD& event,
replyPump0.getPump().getName());
storeToLLSDPath(modevent, replyPump1NamePath,
replyPump1.getPump().getName());
- LL_DEBUGS("lleventcoro") << "postEventAndSuspend2(): coroutine " << name
+ LL_DEBUGS("lleventcoro") << "postAndSuspend2(): coroutine " << name
<< " posting to " << requestPump.getPump().getName()
<< ": " << modevent << LL_ENDL;
requestPump.getPump().post(modevent);
}
- LL_DEBUGS("lleventcoro") << "postEventAndSuspend2(): coroutine " << name
+ LL_DEBUGS("lleventcoro") << "postAndSuspend2(): coroutine " << name
<< " about to wait on LLEventPumps " << replyPump0.getPump().getName()
<< ", " << replyPump1.getPump().getName() << LL_ENDL;
// trying to dereference ("resolve") the future makes us wait for it
@@ -285,7 +285,7 @@ LLEventWithID postEventAndSuspend2(const LLSD& event,
llcoro::Suspending suspended;
value = *future;
} // destroy Suspending as soon as we're back
- LL_DEBUGS("lleventcoro") << "postEventAndSuspend(): coroutine " << name
+ LL_DEBUGS("lleventcoro") << "postAndSuspend(): coroutine " << name
<< " resuming with (" << value.first << ", " << value.second << ")"
<< LL_ENDL;
// returning should disconnect both connections
diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h
index a09759c9cf..6fda3d2572 100755
--- a/indra/llcommon/lleventcoro.h
+++ b/indra/llcommon/lleventcoro.h
@@ -123,14 +123,14 @@ void suspend();
* entered. Therefore, the coroutine completely misses an immediate reply
* event, making it suspend indefinitely.
*
- * By contrast, postEventAndSuspend() listens on the @a replyPump @em before posting
+ * By contrast, postAndSuspend() listens on the @a replyPump @em before posting
* the specified LLSD event on the specified @a requestPump.
*
* @param event LLSD data to be posted on @a requestPump
* @param requestPump an LLEventPump on which to post @a event. Pass either
* the LLEventPump& or its string name. However, if you pass a
* default-constructed @c LLEventPumpOrPumpName, we skip the post() call.
- * @param replyPump an LLEventPump on which postEventAndSuspend() will listen for a
+ * @param replyPump an LLEventPump on which postAndSuspend() will listen for a
* reply. Pass either the LLEventPump& or its string name. The calling
* coroutine will suspend until that reply arrives. (If you're concerned about a
* reply that might not arrive, please see also LLEventTimeout.)
@@ -155,7 +155,7 @@ void suspend();
* @a replyPumpNamePath specifies the entry in the lowest-level structure in
* @a event into which to store <tt>replyPump.getName()</tt>.
*/
-LLSD postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requestPump,
+LLSD postAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requestPump,
const LLEventPumpOrPumpName& replyPump, const LLSD& replyPumpNamePath=LLSD());
/// Wait for the next event on the specified LLEventPump. Pass either the
@@ -163,8 +163,8 @@ LLSD postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& request
inline
LLSD suspendUntilEventOn(const LLEventPumpOrPumpName& pump)
{
- // This is now a convenience wrapper for postEventAndSuspend().
- return postEventAndSuspend(LLSD(), LLEventPumpOrPumpName(), pump);
+ // This is now a convenience wrapper for postAndSuspend().
+ return postAndSuspend(LLSD(), LLEventPumpOrPumpName(), pump);
}
} // namespace llcoro
@@ -201,10 +201,10 @@ namespace llcoro
* the single-pump function) or LLEventOrPumpName (@a replyPump1 for two-pump
* function).
*
- * It seems less burdensome to write postEventAndSuspend2() than to write either
+ * It seems less burdensome to write postAndSuspend2() than to write either
* LLSD("someString") or LLEventOrPumpName("someString").
*/
-LLEventWithID postEventAndSuspend2(const LLSD& event,
+LLEventWithID postAndSuspend2(const LLSD& event,
const LLEventPumpOrPumpName& requestPump,
const LLEventPumpOrPumpName& replyPump0,
const LLEventPumpOrPumpName& replyPump1,
@@ -218,8 +218,8 @@ inline
LLEventWithID
suspendUntilEventOn(const LLEventPumpOrPumpName& pump0, const LLEventPumpOrPumpName& pump1)
{
- // This is now a convenience wrapper for postEventAndSuspend2().
- return postEventAndSuspend2(LLSD(), LLEventPumpOrPumpName(), pump0, pump1);
+ // This is now a convenience wrapper for postAndSuspend2().
+ return postAndSuspend2(LLSD(), LLEventPumpOrPumpName(), pump0, pump1);
}
/**
@@ -312,7 +312,7 @@ public:
LLSD postAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requestPump,
const LLSD& replyPumpNamePath=LLSD())
{
- return llcoro::postEventAndSuspend(event, requestPump, mPump, replyPumpNamePath);
+ return llcoro::postAndSuspend(event, requestPump, mPump, replyPumpNamePath);
}
private:
@@ -371,7 +371,7 @@ public:
const LLSD& replyPump0NamePath=LLSD(),
const LLSD& replyPump1NamePath=LLSD())
{
- return llcoro::postEventAndSuspend2(event, requestPump, mPump0, mPump1,
+ return llcoro::postAndSuspend2(event, requestPump, mPump0, mPump1,
replyPump0NamePath, replyPump1NamePath);
}
diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp
index 5cced69670..1ee79e9eb6 100755
--- a/indra/llcommon/tests/lleventcoro_test.cpp
+++ b/indra/llcommon/tests/lleventcoro_test.cpp
@@ -129,7 +129,7 @@ typedef coroutine<std::string::iterator(void)> match_coroutine_type;
*****************************************************************************/
/// Simulate an event API whose response is immediate: sent on receipt of the
/// initial request, rather than after some delay. This is the case that
-/// distinguishes postEventAndSuspend() from calling post(), then calling
+/// distinguishes postAndSuspend() from calling post(), then calling
/// suspendUntilEventOn().
class ImmediateAPI
{
@@ -532,7 +532,7 @@ namespace tut
{
BEGIN
{
- result = postEventAndSuspend(LLSDMap("value", 17), // request event
+ result = postAndSuspend(LLSDMap("value", 17), // request event
immediateAPI.getPump(), // requestPump
"reply1", // replyPump
"reply"); // request["reply"] = name
@@ -554,7 +554,7 @@ namespace tut
{
BEGIN
{
- LLEventWithID pair = ::postEventAndSuspend2(LLSDMap("value", 18),
+ LLEventWithID pair = ::postAndSuspend2(LLSDMap("value", 18),
immediateAPI.getPump(),
"reply2",
"error2",
@@ -582,7 +582,7 @@ namespace tut
{
BEGIN
{
- LLEventWithID pair = ::postEventAndSuspend2(LLSDMap("value", 18)("fail", LLSD()),
+ LLEventWithID pair = ::postAndSuspend2(LLSDMap("value", 18)("fail", LLSD()),
immediateAPI.getPump(),
"reply2",
"error2",