<br><br><div class="gmail_quote">2013/3/26 Manuel A. Rubio "Bombadil" <span dir="ltr"><<a href="mailto:bombadil@bosqueviejo.net" target="_blank">bombadil@bosqueviejo.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Sri,<br>
<br>
El 2013-03-26 16:53, Siri Hansen escribió:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This is a bug in cover. To confirm it you could call ets:delete(Table)<br>
for each ets table just before<br>
<br>
unregister(?SERVER) <br>
<br>
in cover:main_process_loop/1.<br>
</blockquote>
<br></div>
I use covertool[1] for export tests to jenkins and did a fork and add it cover.erl[2] modified to overload the original code with the workaround:<br>
<br>
line 561:<br>
------------------------------<u></u>------------------------------<u></u>----------------<br>
init_main(Starter) -><br>
    %% Having write concurrancy here gives a 40% performance boost<br>
    %% when collect/1 is called.<br>
    case ets:info(?COVER_TABLE) of<br>
        undefined -><br>
            register(?SERVER,self()),<br>
            ets:new(?COVER_TABLE, [set, public, named_table<br>
                           ,{write_concurrency, true}<br>
                          ]),<br>
            ets:new(?COVER_CLAUSE_TABLE, [set, public, named_table]),<br>
            ets:new(?BINARY_TABLE, [set, named_table]),<br>
            ets:new(?COLLECTION_TABLE, [set, public, named_table]),<br>
            ets:new(?COLLECTION_CLAUSE_<u></u>TABLE, [set, public, named_table]),<br>
            process_flag(trap_exit,true),<br>
            Starter ! {?SERVER,started},<br>
            main_process_loop(#main_state{<u></u>});<br>
        _ -><br>
            catch ets:delete(?COVER_TABLE),<br>
            catch ets:delete(?COVER_CLAUSE_<u></u>TABLE),<br>
            catch ets:delete(?BINARY_TABLE),<br>
            catch ets:delete(?COLLECTION_TABLE),<br>
            catch ets:delete(?COLLECTION_CLAUSE_<u></u>TABLE),<br>
            init_main(Starter)<br>
    end.<br>
------------------------------<u></u>------------------------------<u></u>----------------<br>
<br>
It works well, but I supose I can move the ets:delete block to main_loop, when call to stop.</blockquote><div><br></div><div>Yes, I think that would be cleaner. It would ensure that cover is completely stopped when cover:stop/0 returns.</div>
<div>/siri</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
[1] <a href="https://github.com/bosqueviejo/covertool/" target="_blank">https://github.com/<u></u>bosqueviejo/covertool/</a><br>
[2] <a href="https://github.com/bosqueviejo/covertool/blob/master/src/cover.erl" target="_blank">https://github.com/<u></u>bosqueviejo/covertool/blob/<u></u>master/src/cover.erl</a><br>
<br>
Regards.<span class="HOEnZb"><font color="#888888"><br>
Manuel Rubio.<br>
</font></span></blockquote></div><br>