久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <small id='YKHs0'></small><noframes id='YKHs0'>

        <bdo id='YKHs0'></bdo><ul id='YKHs0'></ul>
    2. <legend id='YKHs0'><style id='YKHs0'><dir id='YKHs0'><q id='YKHs0'></q></dir></style></legend>

      <tfoot id='YKHs0'></tfoot>

      <i id='YKHs0'><tr id='YKHs0'><dt id='YKHs0'><q id='YKHs0'><span id='YKHs0'><b id='YKHs0'><form id='YKHs0'><ins id='YKHs0'></ins><ul id='YKHs0'></ul><sub id='YKHs0'></sub></form><legend id='YKHs0'></legend><bdo id='YKHs0'><pre id='YKHs0'><center id='YKHs0'></center></pre></bdo></b><th id='YKHs0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YKHs0'><tfoot id='YKHs0'></tfoot><dl id='YKHs0'><fieldset id='YKHs0'></fieldset></dl></div>

      Node.js 事件流:在哪里設置 MaxListeners?

      Node.js event-stream: Where to setMaxListeners?(Node.js 事件流:在哪里設置 MaxListeners?)

      <legend id='pZokz'><style id='pZokz'><dir id='pZokz'><q id='pZokz'></q></dir></style></legend>
          • <bdo id='pZokz'></bdo><ul id='pZokz'></ul>

                <tbody id='pZokz'></tbody>
                <tfoot id='pZokz'></tfoot>

                <small id='pZokz'></small><noframes id='pZokz'>

              1. <i id='pZokz'><tr id='pZokz'><dt id='pZokz'><q id='pZokz'><span id='pZokz'><b id='pZokz'><form id='pZokz'><ins id='pZokz'></ins><ul id='pZokz'></ul><sub id='pZokz'></sub></form><legend id='pZokz'></legend><bdo id='pZokz'><pre id='pZokz'><center id='pZokz'></center></pre></bdo></b><th id='pZokz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='pZokz'><tfoot id='pZokz'></tfoot><dl id='pZokz'><fieldset id='pZokz'></fieldset></dl></div>

                本文介紹了Node.js 事件流:在哪里設置 MaxListeners?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我已經搜索并搜索了這個,但無濟于事.我已經梳理了網絡(包括 Stackoverflow)和 Node 文檔以尋找答案,但沒有找到一個有效的答案(也許這對我來說只是不好的搜索).我正在處理 gulp 配置文件中的事件流,并且我有一個特定的任務正在從 EventEmitter 類中遇到經典的檢測到內存泄漏"錯誤.根據我的發現,處理這個問題的答案似乎是調用 EventEmitter 類的 setMaxListeners 方法;我的研究表明事件流有一個 Stream 對象,它應該是 EventEmitter 的一個實例.但是,無論我嘗試調用 setMaxListeners 的方式,我都找不到方法.在精疲力盡地研究這個問題之后,我想我會把它帶到這里的節點專家那里(我假設這很簡單,我只是錯過了一些東西).這是我的代碼:

                I have searched and searched for this, to no avail. I've combed the web (including Stackoverflow), and the Node docs for an answer, and not found one---that worked (maybe that's just bad searching on my part). I'm working with an event-stream in a gulp config file, and I have a particular task that is hitting the classic "memory leak detected" error from the EventEmitter class. From what I've found, the answer to dealing with this issue seems to be to call the setMaxListeners method of the EventEmitter class; and my research has suggested that the event-stream has a Stream object, which should be an instance of EventEmitter. However, what ever way I try to call setMaxListeners, I get method not found. After exhausting myself researching the issue, I figured I'd bring it to the Node gurus here (I'm assuming this is simple, and I'm just missing something). Here's my code:

                return eventStream.merge(
                        gulp.src('./jscript/libs/file-one.js'),
                        gulp.src('./jscript/libs/filder_one/file-two.js'),
                        gulp.src('./jscript/libs/folder_two/file-three.js'),
                        gulp.src('./jscript/libs/folder_three/file_four.js'),
                        gulp.src('./jscript/libs/folder_four/file_five.js'),
                        gulp.src('./jscript/libs/folder_five/file_six.js'), 
                        gulp.src('./jscript/libs/file_seven.js'),
                        gulp.src('./jscript/libs/file_eight.js'),
                        gulp.src('./jscript/lists/rules/*.js')
                    )        
                    .pipe(concat('my_file.js'))
                    .pipe(gulp.dest('./jscript/dist/'))
                    .pipe(rename('my_file.min.js'))
                    .pipe(uglify())
                    .pipe(gulp.dest('./jscript/dist/'));
                

                謝謝!

                推薦答案

                這不是您問題的直接答案,但是您可以將 glob 模式數組傳遞給 'gulp.src()' 而不是合并多個 'gulp.src() 的.不解決你的問題嗎?

                This is not a direct answer to your question, but you can pass an array of glob patterns to 'gulp.src()' instead of merging multiple 'gulp.src()'s. Doesn't it solve your problem?

                https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulpsrcglobs-options

                編輯

                作為直接答案,以下內容對我有用:

                As a direct answer, the following worked for me:

                var merged = eventStream.merge(...);
                merged.setMaxListeners(0);
                return merged.pipe(...);
                

                雖然在合并函數中添加了事件偵聽器,但似乎在事件循環的滴答聲之間檢查了偵聽器計數.所以我們可以在添加監聽器后立即設置MaxListeners.

                While event listeners are added in the merge function, the listener count seems to be checked between ticks of the event loop. So we can setMaxListeners right after adding listeners.

                這篇關于Node.js 事件流:在哪里設置 MaxListeners?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)
                Detect FLASH plugin crashes(檢測 FLASH 插件崩潰)
              2. <tfoot id='BHG4c'></tfoot>

              3. <i id='BHG4c'><tr id='BHG4c'><dt id='BHG4c'><q id='BHG4c'><span id='BHG4c'><b id='BHG4c'><form id='BHG4c'><ins id='BHG4c'></ins><ul id='BHG4c'></ul><sub id='BHG4c'></sub></form><legend id='BHG4c'></legend><bdo id='BHG4c'><pre id='BHG4c'><center id='BHG4c'></center></pre></bdo></b><th id='BHG4c'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='BHG4c'><tfoot id='BHG4c'></tfoot><dl id='BHG4c'><fieldset id='BHG4c'></fieldset></dl></div>

                    <tbody id='BHG4c'></tbody>

                  <small id='BHG4c'></small><noframes id='BHG4c'>

                  1. <legend id='BHG4c'><style id='BHG4c'><dir id='BHG4c'><q id='BHG4c'></q></dir></style></legend>

                      • <bdo id='BHG4c'></bdo><ul id='BHG4c'></ul>
                        1. 主站蜘蛛池模板: 羞视频在线观看 | 精品欧美一区二区中文字幕视频 | 亚洲精品无 | 日韩美香港a一级毛片免费 国产综合av | 日韩在线精品强乱中文字幕 | 国产精品夜色一区二区三区 | 亚洲风情在线观看 | 久久久久国产一区二区三区 | 人人干在线视频 | 香蕉久久久| 日韩欧美国产成人一区二区 | 亚洲欧美日韩精品久久亚洲区 | 亚洲精品久久久久久一区二区 | 亚洲精品小视频在线观看 | 99国产精品久久久久老师 | 欧美国产一区二区 | 一二三四av| 日日操夜夜操天天操 | 国产精品一二三区 | 日韩精品在线免费观看视频 | 欧美激情精品久久久久久 | 亚洲久草| 日韩电影免费在线观看中文字幕 | 懂色中文一区二区三区在线视频 | 国产亚洲精品美女久久久久久久久久 | 欧美一级视频 | 日日夜夜狠狠操 | 成人妇女免费播放久久久 | 亚洲av毛片| 久久国产精品精品 | 一区影视| 国产乱码久久久久久 | 精品国产91| av黄色在线播放 | 9久久婷婷国产综合精品性色 | 91看片网| 日韩视频精品 | 国产精品视频观看 | 国产精品久久久久久久久久尿 | 亚洲国产精品一区二区第一页 | 91国内产香蕉|