@@ -95,7 +95,7 @@ defimpl Enumerable, for: GenEvent.Stream do
95
95
# The handler was removed. Stop iteration, resolve the
96
96
# event later. We need to demonitor now, otherwise DOWN
97
97
# appears with higher priority in the shutdown process.
98
- { :gen_event_EXIT , { GenEvent.Stream , ^ self } , _reason } = event ->
98
+ { :gen_event_EXIT , ^ self , _reason } = event ->
99
99
Process . demonitor ( mon_ref , [ :flush ] )
100
100
send ( self , event )
101
101
{ :halt , { :removed , acc } }
@@ -137,7 +137,7 @@ defimpl Enumerable, for: GenEvent.Stream do
137
137
# so we trigger a request for doing so.
138
138
defp stop ( stream , { pid , _ , _ } = acc ) do
139
139
parent = self ( )
140
- _ = Task . start ( fn -> GenEvent . remove_handler ( pid , { GenEvent.Stream , parent } , :shutdown ) end )
140
+ _ = Task . start ( fn -> GenEvent . remove_handler ( pid , parent , :shutdown ) end )
141
141
stop ( stream , { :removed , acc } )
142
142
end
143
143
@@ -148,13 +148,13 @@ defimpl Enumerable, for: GenEvent.Stream do
148
148
{ _from , { ^ pid , ^ ref } , { notify , _event } } when notify in [ :ack_notify , :sync_notify ] ->
149
149
send pid , { ref , :done }
150
150
wait_for_handler_removal ( pid , ref , mon_ref )
151
- { :gen_event_EXIT , { GenEvent.Stream , ^ self } , reason }
151
+ { :gen_event_EXIT , ^ self , reason }
152
152
when reason == :normal
153
153
when reason == :shutdown
154
154
when tuple_size ( reason ) == 3 and elem ( reason , 0 ) == :swapped ->
155
155
Process . demonitor ( mon_ref , [ :flush ] )
156
156
:ok
157
- { :gen_event_EXIT , { GenEvent.Stream , ^ self } , reason } ->
157
+ { :gen_event_EXIT , ^ self , reason } ->
158
158
Process . demonitor ( mon_ref , [ :flush ] )
159
159
{ :error , reason }
160
160
{ :DOWN , ^ mon_ref , _ , _ , reason } ->
0 commit comments