Revision: 4824 http://sourceforge.net/p/vexi/code/4824 Author: mkpg2 Date: 2015-11-10 14:04:57 +0000 (Tue, 10 Nov 2015) Log Message: ----------- Improve Debugging. Show traces of unfinished threads when exiting and show a thread name if set in the application.
Modified Paths: -------------- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Thread.java Added Paths: ----------- branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/core/slow_thread.t Modified: branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Thread.java =================================================================== --- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Thread.java 2015-11-09 01:22:17 UTC (rev 4823) +++ branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Thread.java 2015-11-10 14:04:57 UTC (rev 4824) @@ -91,7 +91,16 @@ public String description() { if (f!=null) { - return type+", "+f.definedAt(); + JS thread_name = f.object.getSafe(JSU.S("name")); + String r = type+", "+f.definedAt(); + if(thread_name!=null){ + r += " - "+thread_name; + } + if(currentInterpreter!=null){ + r += JSUX.backtrace(currentInterpreter); + } + + return r; } return type; } Added: branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/core/slow_thread.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/core/slow_thread.t (rev 0) +++ branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/core/slow_thread.t 2015-11-10 14:04:57 UTC (rev 4824) @@ -0,0 +1,26 @@ +<!-- public domain --> + +<vexi xmlns:ui="vexi://ui" + xmlns="vexi.widget"> + + <surface /> + <ui:box orient="vertical"> + var i=0; + var x = function(){ + vexi.thread.sleep(1000); + vexi.log.info("!"+(i++)); + }; + var thread = function(){ + while(true){ + x(); + } + }; + thread.name = "Slow thread"; + + vexi.thread = thread; + + + vexi.ui.frame = thisbox; + + </ui:box> +</vexi> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn