protected override JobHandle OnUpdate(JobHandle inputDeps) { if (!_jobHandle.IsCompleted) { Debug.Log("ECSBlittablesSystem Job IsCompleted:" + _jobHandle.IsCompleted); return(_jobHandle); } //Use the below code for manually querying through the Entity Manager //var entityManager = World.Active.EntityManager; //var query = new EntityQueryDesc //{ // All = new ComponentType[] { typeof(PositionComponent), typeof(Translation), typeof(LocalToWorld) }, //}; //EntityQuery m_Group = GetEntityQuery(query); //m_Group.ToComponentArray<Translation>(); var newJob = new GenericJob(); _jobHandle = newJob.Schedule(this, inputDeps); //_jobHandle.Complete(); return(_jobHandle); }
public async Task <IHttpActionResult> Post(GenericJob job) { try { Guid userId = RoboBrailleProcessor.getUserIdFromJob(this.Request.Headers.Authorization.Parameter); job.UserId = userId; Guid jobId = await _repository.SubmitWorkItem(job); return(Ok(jobId.ToString("D"))); } catch (Exception e) { var resp = new HttpResponseMessage(HttpStatusCode.InternalServerError) { Content = new StringContent(string.Format("Internal error: {0}", e)), ReasonPhrase = e.Message }; throw new HttpResponseException(resp); } }
private void Awake() { self = this; tubes = new TubeData[arrayLength]; tubeUpdateData = new NativeArray <TubeUpdateData>(arrayLength, Allocator.Persistent); tempOps = new NativeArray <byte>(arrayLength, Allocator.Persistent); headStates = new CanTakeState[arrayLength]; generic = new GenericJob[2]; #if DEBUG_JOB generic[0] = new GenericJob(true); generic[1] = new GenericJob(true); #else generic[0] = new GenericJob(false); generic[1] = new GenericJob(false); #endif generators = new GeneratorData[arrayLength]; converters = new ConverterData[arrayLength]; consumers = new ConsumerData[arrayLength]; itemObjs = new List <GameObject>(16); }
public async Task<IHttpActionResult> Post(GenericJob job) { Guid jobId = await _repository.SubmitWorkItem(job); return Ok(jobId.ToString("D")); }