Pārlūkot izejas kodu

ft: 优化

master
SisMaker pirms 3 gadiem
vecāks
revīzija
79dcb3ba97
3 mainītis faili ar 93 papildinājumiem un 0 dzēšanām
  1. +31
    -0
      src/gen_apu.erl
  2. +31
    -0
      src/gen_mpp.erl
  3. +31
    -0
      src/gen_srv.erl

+ 31
- 0
src/gen_apu.erl Parādīt failu

@ -117,6 +117,9 @@
{reply, Reply :: term(), NewState :: term(), Actions :: actions()} |
{noreply, NewState :: term()} |
{noreply, NewState :: term(), Actions :: actions()} |
{mayReply, Reply :: term()} |
{mayReply, Reply :: term(), NewState :: term()} |
{mayReply, Reply :: term(), NewState :: term(), Actions :: actions()} |
{stop, Reason :: term(), NewState :: term()} |
{stopReply, Reason :: term(), Reply :: term(), NewState :: term()}.
@ -840,12 +843,30 @@ handleCR(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurState, R
reply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, CurState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, CurState, false);
{mayReply, Reply} ->
case From of
false ->
receiveIng(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurState, false);
_ ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, CurState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, CurState, false)
end;
{noreply, NewState} ->
receiveIng(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, false);
{reply, Reply, NewState} ->
reply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, false);
{mayReply, Reply, NewState} ->
case From of
false ->
receiveIng(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, false);
_ ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, false)
end;
{noreply, NewState, Actions} ->
loopEntry(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, listify(Actions));
{stop, Reason, NewState} ->
@ -854,6 +875,16 @@ handleCR(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurState, R
reply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
loopEntry(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, listify(Actions));
{mayReply, Reply, NewState, Actions} ->
case From of
false ->
loopEntry(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, listify(Actions));
_ ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
loopEntry(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, listify(Actions))
end;
{stopReply, Reason, Reply, NewState} ->
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
try

+ 31
- 0
src/gen_mpp.erl Parādīt failu

@ -109,6 +109,9 @@
{reply, Reply :: term(), NewState :: term(), Actions :: actions()} |
{noreply, NewState :: term()} |
{noreply, NewState :: term(), Actions :: actions()} |
{mayReply, Reply :: term()} |
{mayReply, Reply :: term(), NewState :: term()} |
{mayReply, Reply :: term(), NewState :: term(), Actions :: actions()} |
{stop, Reason :: term(), NewState :: term()} |
{stopReply, Reason :: term(), Reply :: term(), NewState :: term()}.
@ -824,12 +827,30 @@ handleCR(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurState, R
reply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, CurState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, CurState, false);
{mayReply, Reply} ->
case From of
false ->
receiveIng(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurState, false);
_ ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, CurState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, CurState, false)
end;
{noreply, NewState} ->
receiveIng(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, false);
{reply, Reply, NewState} ->
reply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, false);
{mayReply, Reply, NewState} ->
case From of
false ->
receiveIng(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, false);
_ ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, false)
end;
{noreply, NewState, Actions} ->
loopEntry(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, listify(Actions));
{stop, Reason, NewState} ->
@ -838,6 +859,16 @@ handleCR(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurState, R
reply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
loopEntry(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, listify(Actions));
{mayReply, Reply, NewState, Actions} ->
case From of
false ->
loopEntry(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, listify(Actions));
_ ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
loopEntry(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, listify(Actions))
end;
{stopReply, Reason, Reply, NewState} ->
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
try

+ 31
- 0
src/gen_srv.erl Parādīt failu

@ -116,6 +116,9 @@
{reply, Reply :: term(), NewState :: term(), Actions :: actions()} |
{noreply, NewState :: term()} |
{noreply, NewState :: term(), Actions :: actions()} |
{mayReply, Reply :: term()} |
{mayReply, Reply :: term(), NewState :: term()} |
{mayReply, Reply :: term(), NewState :: term(), Actions :: actions()} |
{stop, Reason :: term(), NewState :: term()} |
{stopReply, Reason :: term(), Reply :: term(), NewState :: term()}.
@ -814,12 +817,30 @@ handleCR(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurState, R
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, CurState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, CurState, false);
{mayReply, Reply} ->
case From of
false ->
receiveIng(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurState, false);
_ ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, CurState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, CurState, false)
end;
{noreply, NewState} ->
receiveIng(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, false);
{reply, Reply, NewState} ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, false);
{mayReply, Reply, NewState} ->
case From of
false ->
receiveIng(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, false);
_ ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
receiveIng(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, false)
end;
{noreply, NewState, Actions} ->
loopEntry(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, listify(Actions));
{stop, Reason, NewState} ->
@ -828,6 +849,16 @@ handleCR(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurState, R
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
loopEntry(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, listify(Actions));
{mayReply, Reply, NewState, Actions} ->
case From of
false ->
loopEntry(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, NewState, listify(Actions));
_ ->
greply(From, Reply),
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
loopEntry(Parent, Name, Module, HibernateAfterTimeout, NewDebug, Timers, NewState, listify(Actions))
end;
{stopReply, Reason, Reply, NewState} ->
NewDebug = ?SYS_DEBUG(Debug, Name, {out, Reply, From, NewState}),
try

Notiek ielāde…
Atcelt
Saglabāt