Commit d3f05ff3 authored by Linshizhi's avatar Linshizhi

update

parent 2ab6bb36
...@@ -15,8 +15,8 @@ let elapsed = 0; ...@@ -15,8 +15,8 @@ let elapsed = 0;
// from channel // from channel
const RGBFrameSize = 1920*1080*4; const RGBFrameSize = 1920*1080*4;
let READ_SIZE = RGBFrameSize; let READ_SIZE = RGBFrameSize;
const SLEEP_INTERVAL = 100; const SLEEP_INTERVAL = 30;
const SPIN_TIMEOUT = 30; const SPIN_TIMEOUT = 90000;
const ENC_BUF_SIZE = RGBFrameSize * 10 const ENC_BUF_SIZE = RGBFrameSize * 10
let encBuf = null; let encBuf = null;
...@@ -120,6 +120,7 @@ async function step() { ...@@ -120,6 +120,7 @@ async function step() {
await EOFProcessing(); await EOFProcessing();
return true; return true;
} }
return false; return false;
} }
......
import { makeMsg, MESSAGE_TYPE, typeOfMsg } from './encGrooupMsg'; import { makeMsg, MESSAGE_TYPE, typeOfMsg } from './encGrooupMsg';
import { Observable, filter } from 'rxjs'; import { Observable, filter } from './rxjs';
export class WWInitError extends Error { export class WWInitError extends Error {
......
...@@ -323,7 +323,6 @@ export class Channel { ...@@ -323,7 +323,6 @@ export class Channel {
} }
push(data /* Uint8Array */) { push(data /* Uint8Array */) {
if (this.#writePhase != WRITE_PHASE.NO_STEP_WRITE) { if (this.#writePhase != WRITE_PHASE.NO_STEP_WRITE) {
throw new Error("Unable to push into Channel during Step Write"); throw new Error("Unable to push into Channel during Step Write");
} }
...@@ -347,7 +346,6 @@ export class Channel { ...@@ -347,7 +346,6 @@ export class Channel {
for (let key in schedule) { for (let key in schedule) {
plan = schedule[key]; plan = schedule[key];
if (plan.size == 0) if (plan.size == 0)
continue; continue;
......
...@@ -158,7 +158,7 @@ describe("Channel Spec", () => { ...@@ -158,7 +158,7 @@ describe("Channel Spec", () => {
expect(channel.isEmpty()).toBe(true); expect(channel.isEmpty()).toBe(true);
}); });
fit("Two step transfer", async () => { it("Two step transfer", async () => {
let unitSize = 10; let unitSize = 10;
let channel = new Channel(unitSize * 10); let channel = new Channel(unitSize * 10);
......
...@@ -48,7 +48,7 @@ describe("WW Spec", () => { ...@@ -48,7 +48,7 @@ describe("WW Spec", () => {
// Conntect two worker to do plus // Conntect two worker to do plus
// of an input number. // of an input number.
it("Worker Connect", async () => { xit("Worker Connect", async () => {
let src = new WW('SRC', '../resources/tests/workerSRC.js'); let src = new WW('SRC', '../resources/tests/workerSRC.js');
let dst = new WW('DST', '../resources/tests/workerDST.js'); let dst = new WW('DST', '../resources/tests/workerDST.js');
...@@ -145,7 +145,9 @@ describe("EncWW Specifications", () => { ...@@ -145,7 +145,9 @@ describe("EncWW Specifications", () => {
// Send datas // Send datas
for (let i = 0; i < 30; ++i) { for (let i = 0; i < 30; ++i) {
chs[i%2].push(data); while (chs[i%2].push(data) == false) {
console.log("sleep");
}
} }
// Send eof // Send eof
......
...@@ -18,7 +18,7 @@ const RGBAFrameSize = 1920*1080*4; ...@@ -18,7 +18,7 @@ const RGBAFrameSize = 1920*1080*4;
describe("ParaEncoder", () => { describe("ParaEncoder", () => {
it("Encode With ParaEncoder", async () => { xit("Encode With ParaEncoder", async () => {
const data = new Uint8Array([...Array(RGBAFrameSize).keys()]); const data = new Uint8Array([...Array(RGBAFrameSize).keys()]);
let st = new Date(); let st = new Date();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment